Thread: heap limit

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    126

    Question heap limit

    I am trying to run a program of mine, but I keep getting an error.


    Compiler limit: internal heap limit reached; use /Zm to specify a higher limit


    I was wondering if anyone out there could help me in fixing this problem, so that I can run my program.
    Last edited by bob20; 04-15-2002 at 02:04 PM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    The answer is in the error message

    "use /Zm to specify a higher limit"

    Read the manual page for Zm would be the next step

    Then put a suitable Zm into your compiler setup

  3. #3
    Registered User
    Join Date
    Dec 2001
    Posts
    126
    If anyone else has anything helpful to add, please do. Thanks.

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >If anyone else has anything helpful to add, please do. Thanks.
    Generally, Salem has the last word. You probably won't get any more additions. Follow his advice.

    -Prelude
    My best code is written with the delete key.

  5. #5
    Registered User
    Join Date
    Dec 2001
    Posts
    126
    Thanks for the advice, I think that I will.

  6. #6
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,817
    Does your program make lots of calls to malloc or new? How many times are these being called and how big are the items you are trying to allocate? Are there points in your program where you should be freeing up unused memory back to the system but aren't? Are you protecting yourself by checking the value of the pointers after calls to new or malloc? If not, then you should add some code that does check so you can then exit gracefully.
    "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

  7. #7
    Registered User
    Join Date
    Dec 2001
    Posts
    126
    Thanks for the tips, I'll check it out.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Heap Limit?
    By Padawan in forum C++ Programming
    Replies: 8
    Last Post: 04-11-2004, 07:11 PM
  2. Heap limit error???
    By sunburnbyRA in forum C++ Programming
    Replies: 6
    Last Post: 04-10-2003, 03:12 PM
  3. hi need help with credit limit program
    By vaio256 in forum C++ Programming
    Replies: 4
    Last Post: 04-01-2003, 12:23 AM
  4. heap question
    By mackol in forum C Programming
    Replies: 1
    Last Post: 11-30-2002, 05:03 AM
  5. internal heap limit
    By Unregistered in forum C Programming
    Replies: 8
    Last Post: 02-05-2002, 09:33 AM