From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,93ca55d876f9f4fc X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: heap exhausted during elaboration Date: 2000/07/31 Message-ID: <8m42a0$t56$1@nnrp1.deja.com>#1/1 X-Deja-AN: 652778937 References: <39800150.424F8700@hotmail.com> <398494D9.ADE9F40F@mail.utexas.edu> X-Http-Proxy: 1.0 x56.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Jul 31 14:26:15 2000 GMT X-MyDeja-Info: XMYDJUIDtedennison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.7 [en] (WinNT; I) Date: 2000-07-31T00:00:00+00:00 List-Id: In article <398494D9.ADE9F40F@mail.utexas.edu>, "Bobby D. Bryant" wrote: > npriebe wrote: > > > I use a gnat compiler under windows NT and during the elaboration > > time ,I get a error message : storage error : heap exhausted. > > I use many generic packages like : > > with package ... is new ... > > may this is a common problem of a exhausted heap > > > > What can I do? How can I increase the heap or > > do something else? > > Hopefully someone more expert will comment, but AFAIK the only ways to > increase your available heap are to increase the size of your physical > memory, increase the size of your page/swap file, or get other things > out of memory. (You may also be able to reduce the size of the stack > for the program, though this might cause its own problems.) Typically this is a result of doing something very wasteful with memory. The most common one I can think of is declaring a variant record with a variant array field based on some index with a huge range like Positive. Eg: type Dumb_Variant (End : Positive := 5) is record Elements : String (1..Index); end record; Variant_Array_That_Uses_Up_Whole_Memory_Space : Dumb_Variant; On most compilers, this will require your 5-element array to reserve Positive'last bytes of storage for possible future growth. -- T.E.D. http://www.telepath.com/~dennison/Ted/TED.html Sent via Deja.com http://www.deja.com/ Before you buy.