comp.lang.ada
 help / color / mirror / Atom feed
* heap exhausted during elaboration
@ 2000-07-27  0:00 ****
  2000-07-30  0:00 ` Bobby D. Bryant
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: **** @ 2000-07-27  0:00 UTC (permalink / raw)


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?


please help...





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: heap exhausted during elaboration
  2000-07-27  0:00 heap exhausted during elaboration ****
@ 2000-07-30  0:00 ` Bobby D. Bryant
  2000-07-31  0:00   ` Ted Dennison
  2000-08-01  0:00 ` Kent Paul Dolan
  2000-08-02  0:00 ` Harry Overs
  2 siblings, 1 reply; 5+ messages in thread
From: Bobby D. Bryant @ 2000-07-30  0:00 UTC (permalink / raw)
  To: npriebe

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.)

Most likely increasing the size of your page/swap file will not be a
viable solution unless you only need a bit more heap for your program,
especially if the big data is accessed repeatedly during a run, due to
considerations of running time.

Possibly you ran out of virtual memory, but more likely you ran out of
RAM + page/swap file.

Bobby Bryant
Austin, Texas






^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: heap exhausted during elaboration
  2000-07-30  0:00 ` Bobby D. Bryant
@ 2000-07-31  0:00   ` Ted Dennison
  0 siblings, 0 replies; 5+ messages in thread
From: Ted Dennison @ 2000-07-31  0:00 UTC (permalink / raw)


In article <398494D9.ADE9F40F@mail.utexas.edu>,
  "Bobby D. Bryant" <bdbryant@mail.utexas.edu> 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.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: heap exhausted during elaboration
  2000-07-27  0:00 heap exhausted during elaboration ****
  2000-07-30  0:00 ` Bobby D. Bryant
@ 2000-08-01  0:00 ` Kent Paul Dolan
  2000-08-02  0:00 ` Harry Overs
  2 siblings, 0 replies; 5+ messages in thread
From: Kent Paul Dolan @ 2000-08-01  0:00 UTC (permalink / raw)


In article <39800150.424F8700@hotmail.com>, ****  <npriebe@hotmail.com> 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?

>please help...

There are a couple of mis-steps you can make that try to allocate
arrays the size of UNIVERSAL_INTEGER_MIN..UNIVERSAL_INTEGER_MAX or
whatever it is called that have been discussed here a few times;
perhaps it isn't that your program is so big, just that a couple of
your data items are hiddenly huge, by mistake.

Others here can comment more exactly on the issue, I just noticed that
it hasn't been mentioned at all yet, so I thought I'd stick in my
amateur oar to roil the waters.

Cheers!

xanthian.


               ===== random archival quality quote =====

"They're expending enough energy just taking in oxygen on a daily basis,
you  think  they  have  any  synaptic  activity  left  over to devote to
Intelligent Thought?"
                            -- Synth F. Oberheim <synth@yenta.alb.nm.us>

--
Kent Paul Dolan.
<xanthian@well.com> <xanthian@aztec.asu.edu> <kdolan@ebay.com>





^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: heap exhausted during elaboration
  2000-07-27  0:00 heap exhausted during elaboration ****
  2000-07-30  0:00 ` Bobby D. Bryant
  2000-08-01  0:00 ` Kent Paul Dolan
@ 2000-08-02  0:00 ` Harry Overs
  2 siblings, 0 replies; 5+ messages in thread
From: Harry Overs @ 2000-08-02  0:00 UTC (permalink / raw)


If it does not use threads then I think the heap size is the max memory
available on your machine.

So to increase heap, up memory or swap space ???


Regards

Paul Hussein.
"****" <npriebe@hotmail.com> wrote in message
news:39800150.424F8700@hotmail.com...
> 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?
>
>
> please help...
>






^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2000-08-02  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-27  0:00 heap exhausted during elaboration ****
2000-07-30  0:00 ` Bobby D. Bryant
2000-07-31  0:00   ` Ted Dennison
2000-08-01  0:00 ` Kent Paul Dolan
2000-08-02  0:00 ` Harry Overs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox