[Insight-developers] Internal Heap Limit

Yinpeng Jin yj76@columbia.edu
Mon, 16 Apr 2001 15:40:46 -0400


fatal error C1076: compiler limit : internal heap limit reached; use /Zm to
specify a higher limit
        c:\program files\microsoft visual studio\vc98\include\xmemory(66) :
while compiling class-template member function 'void __thiscall
itk::Voronoi2DDiagram<double>::clip_line(class
itk::Voronoi2DDiagram<double>::FortuneEdge *)'
Error executing cl.exe.


This happens to me when I try to use my two ITK segmentation methods in a
single code, when I rise the /Zm value, it works fine. But this doesn't
sound like a nice solution.
Can any expert on this issue give me some general ideas about how to reduce
this heap usage in my code? MSDN gives me the answer of
  a.. Eliminate unnecessary include files, especially unneeded #defines and
function prototypes.

  b.. Eliminate some global variables. For instance, use a pointer to
allocate memory dynamically, at run time, instead of declaring a large
array.

  c.. Eliminate unused declarations.

  d.. Break up very large functions into smaller ones.

  e.. Break up very large classes into smaller ones.

  f.. Split the current file into two or more files and compile them
separately.
It takes time to do these break-up things, and I am not sure if it will
work.


Yinpeng