[Insight-developers] Internal Heap Limit

Bill Hoffman bill.hoffman@kitware.com
Mon, 16 Apr 2001 15:44:11 -0400


The cmake generated files all use /Zm1000.   This is a requirement for
using ITK.  Seems to be a function of using stl and std::ios with the
windows compiler.

-Bill


At 03:40 PM 4/16/2001 -0400, Yinpeng Jin wrote:
>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
>
>
>_______________________________________________
>Insight-developers mailing list
>Insight-developers@public.kitware.com
>http://public.kitware.com/mailman/listinfo/insight-developers