comp.lang.ada
 help / color / mirror / Atom feed
From: "Marc A. Criley" <mcriley@icdc.com>
Subject: Re: Task stack overflow problem with GNAT
Date: 2000/10/06
Date: 2000-10-06T00:00:00+00:00	[thread overview]
Message-ID: <39DE061B.51F62B69@icdc.com> (raw)
In-Reply-To: 8rkhnt$4ac$1@nnrp1.deja.com

fabien_bousquet@my-deja.com wrote:
> 
> Hi,
> I have a task which is raising a Storage_Error exception ("Stack
> overflow").
> I am using the compiler GNAT 3.13p.
> I have tried to put in the specification of my task type a "pragma
> Storage_Size(32000)" and it has changed nothing !!
> Is there another way to change a task stack size with the GNAT or have
> I misunderstood the usage of the pragma Storage_Size ?
> 
One thing that that needs to be done to help narrow down the problem is to
determine exactly where the raising of the Storage_Error is occurring.  Is there
something obvious there, like trying to declare a huge object that would be
placed in the stack space?

Or is there nothing suspicious at the point where the Storage_Error is raised? 
I experienced this frequently on a previous program on which I worked, and there
were two solutions:

1) Find big data items and dynamically allocate them off the heap, rather than
having them reside on the stack.

2) Increase the task storage size, as you said you've done.  You state that you
raised it to 32K and there's still a problem.  Actually, that's not surprising
to me.  We usually started at 32K and went up.  The largest Storage_Size
allocation we had to use is on the order of 160K.  We didn't do this across the
board, but would just bump it up whenever it occurred (after scrubbing for any
instances of unwarranted large objects or looking for instances where option #1
might be useful).

Marc




  reply	other threads:[~2000-10-06  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-06  0:00 Task stack overflow problem with GNAT fabien_bousquet
2000-10-06  0:00 ` Marc A. Criley [this message]
2000-10-09  0:00   ` fabien_bousquet
2000-10-09  0:00     ` Ted Dennison
2000-10-09  0:00       ` fabien_bousquet
2000-10-09  0:00       ` Pat Rogers
2000-10-09  0:00         ` Steven Deller
2000-10-10  0:00           ` fabien_bousquet
replies disabled

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