Thread: error c1060 - compiler out of heap space

  1. #1
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    838

    error c1060 - compiler out of heap space

    i'm hitting this problem and i don't quite know why. cl seems to be peaking at around 100M; and i've used /zm2000 to increase the limit to 1G

    anyone have experience with rearranging project files & such to help this? i really don't want to have to untemplatize all my code and write separate classes for all these things :|

  2. #2
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    What compiler/version?
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  3. #3
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    838
    VS 2k8 pro; running win7 x64 ultimate
    Last edited by m37h0d; 03-24-2010 at 08:31 AM.

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Just how big are your source files?

    This smacks of you have a single project.cpp which #includes ALL your source files.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    838
    yes, that is the basic problem. there is one place where a lot of templated code all has to come together. the source files themselves are relatively small - ~250 lines at most.

    this is not a problem for the backend of my application - i can instantiate all these objects just fine there. but when i try to additionally create the qt widgets that use those backend objects, i get c1060.
    Last edited by m37h0d; 03-24-2010 at 12:41 PM.

  6. #6
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    838
    looks like it was a covariant return type of a virtual function in a templatized factory object when i fed it a templatized object!

    /whew

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. [resolved] internal compiler error...
    By bling in forum C++ Programming
    Replies: 2
    Last Post: 12-10-2008, 12:57 PM
  2. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  3. Suggestions on this C style code
    By Joelito in forum C Programming
    Replies: 11
    Last Post: 06-07-2007, 03:22 AM
  4. Get an error when trying to clear the heap space
    By sara.stanley in forum C++ Programming
    Replies: 11
    Last Post: 06-02-2006, 01:29 PM
  5. stach and heap.
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 01-26-2002, 09:37 AM