Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!rpi!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!uunet!microsoft!gregj From: gregj@microsoft.UUCP (Greg JONES) Newsgroups: comp.os.os2.misc Subject: Re: near heap space Summary: near heap space Message-ID: <56058@microsoft.UUCP> Date: 25 Jul 90 01:46:40 GMT References: <1990Jul19.003747.18984@murdoch.acc.Virginia.EDU> <12599@june.cs.washington.edu> Distribution: usa Organization: Microsoft Corp., Redmond WA Lines: 24 In article <12599@june.cs.washington.edu>, slh@fred.cs.washington.edu (Scott Heyano) writes: > In article <1990Jul19.003747.18984@murdoch.acc.Virginia.EDU> tg2r@dale.acc.Virginia.EDU (Todd Greenwald) writes: > >As my pm programs increase in size, I'm increasingly encountering > >a compile error "out of near heap space". I'm using the IBMc2 > >compiler. Has anyone encountered this and found a fix. (I've > >discovered some interesting solutions; like removing INCL_WIN when > >there were no Win calls being made.) > > Making the source smaller is the solution. > And by including fewer header files or less header file (I'm not sure which > counts exactly), Amount of heap space used for symbols is the problem. So it depends on what the header files define. Presumably (I'm a net guy, not a language guy) #define's don't contribute, but typedef's and function prototypes do. I find the best candidate is usually changing #define INCL_GPI to INCL_GPIPRIMITIVES if you use some simple GPI stuff (like GpiErase) but don't get into anything more complex. pmgpi.h defines a LOT of symbols. uunet!microsof!gregj [I just happen to work here. Sheer coincidence.]