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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,682c6a4dc0495d48 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!eweka.nl!hq-usenetpeers.eweka.nl!cyclone03.ams.highwinds-media.com!news.highwinds-media.com!npeersf01.ams.highwinds-media.com!newsfe24.ams2.POSTED!40385e62!not-for-mail Message-ID: <4911CED8.5030703@bredband.net> From: Per Sandberg User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Stackusage at runtime References: <4910AB86.3040001@bredband.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@WWWSpace.NET NNTP-Posting-Date: Wed, 05 Nov 2008 17:00:15 UTC Date: Wed, 05 Nov 2008 17:50:32 +0100 Xref: g2news2.google.com comp.lang.ada:8306 Date: 2008-11-05T17:50:32+01:00 List-Id: Yes top secret because that the last place a lot people looks :) Concerning APEX, once upon a time i the dark ages (80:ties & 90:ties) we was using apex as well for embedded systems. What we did at that point in time was something along these lines: * On program start fill the memory allocated for the stacks with 16#CACA#. * After some time of execution query the operation system /Runtimes of the following, Stack start & Stack Size very very target dependent. * Iterate from the free side of the allocated memory for each stack until no more "CACA" is found. * Thats how we did it then. And that is actually the the same basic method used in the more modern GCC/GNAT system to obtain the same result. But if its possible to do static analysis with gnatstack that much better. Concerning Ada and stacks as far as i know there is nothing defined in the language . /Hope you will find a way in the dark labyrinth of memory:) /Per Andy wrote: > On 4 Nov., 21:07, Per Sandberg wrote: >> If you are running GNAT it is quite straight forward and described in >> detail in the top secret document (The GNAT users guide chapter 22. >> Stack Related Facilities) > oops ... top secret? .... :-)) > > > We are using Apex ... Probably we think about adacores static analysis > tool ... > > I thought that ada itself has a possibility to report the memory-usage > at a specific time > > Thank you all for your help > Andy