[AWS] Some questions about Line_Stack_Size

Pascal Obry pascal at obry.net
Tue Jan 4 17:47:34 CET 2011


Thomas,

> Now my questions:
> 
>     1. How do I best figure out how much stack my callbacks require?

That's a difficult question. AdaCore has a tool named gnatstack which
can be used to compute statically the max stack sized needed but this is
mostly done for embedded target AFAIK. There is also now a new gnatbind
option which enable analyze and report stack usage (-u).

>     2. How was the default calculated?

It is 16#150_000#, not calculated but something that looks like a "nice"
default. Larger than what is used by AWS itself so letting some space
for the callback. Note that I'm using this default for the Vision2Pixels
site without problem.

>     3. What happens if, for some reason or another, a callback breaks the limit?

The program would crash or you get an exception if the -fstack-check
option is used.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|    http://www.obry.net  -  http://v2p.fr.eu.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver keys.gnupg.net --recv-key F949BD3B



More information about the AWS mailing list