comp.lang.ada
 help / color / mirror / Atom feed
From: fabien_bousquet@my-deja.com
Subject: Re: Task stack overflow problem with GNAT
Date: 2000/10/09
Date: 2000-10-09T00:00:00+00:00	[thread overview]
Message-ID: <8rrtmc$fcc$1@nnrp1.deja.com> (raw)
In-Reply-To: 39DE061B.51F62B69@icdc.com

In article <39DE061B.51F62B69@icdc.com>,
  "Marc A. Criley" <mcriley@icdc.com> wrote:
> 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
>
My code is supposed to be embedded and I do not use dynamic allocation.
My code is object oriented and it contains a lot of operators.
The stack overflow is sent on a overriding operator "-" during the
fourth execution of a task.
I am not sure but I suppose that this could be linked to the usage of
protected object in the synchronisation between tasks.
I will try the pragma Storage_Size(160000).

Thanks,
Fabien Bousquet


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~2000-10-09  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
2000-10-09  0:00   ` fabien_bousquet [this message]
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