Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

heap limit

Status
Not open for further replies.

Bob20

IS-IT--Management
Aug 4, 2004
1
ZA
I am trying to run a program of mine, but I keep getting an error.


Compiler limit: internal heap limit reached


I was wondering if anyone out there could help me in fixing this problem, so that I can run my program.
 
Well... Either you are using an old computer with very little memory available or you are declaring a huge static array, like
double longArray[1298723984723423]...
or both...

And depends also on the compiler you are using, on its internal settings. [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
Also, check for recursion... this will blow your heap if you dont have a situation to stop it. A common mistake is something like

int Summmation(unsigned int x)
{
if(x<0)
return 0;
else
return x + Summation(x-1);

}

This fails because x is unsigned so it will never be negative.

Matt
 
Matt, isn't the recursion stuff a problem only at run-time? The error message seems to indicate a compiler error... [red]Nosferatu[/red]
We are what we eat...
There's no such thing as free meal...
once stated: methane@personal.ro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top