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 Path: g2news1.google.com!news1.google.com!postnews.google.com!g17g2000prg.googlegroups.com!not-for-mail From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: Yes it is possible. Re: Stackusage at runtime Date: Wed, 5 Nov 2008 01:31:14 -0800 (PST) Organization: http://groups.google.com Message-ID: <3c9a589e-da1c-4d8c-b42e-e84bcde38739@g17g2000prg.googlegroups.com> References: NNTP-Posting-Host: 153.98.68.197 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1225877474 20091 127.0.0.1 (5 Nov 2008 09:31:14 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 5 Nov 2008 09:31:14 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: g17g2000prg.googlegroups.com; posting-host=153.98.68.197; posting-account=pcLQNgkAAAD9TrXkhkIgiY6-MDtJjIlC User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:2575 Date: 2008-11-05T01:31:14-08:00 List-Id: anon wrote: > To monitor the main (system) stack that GNAT uses, you need to alter the > System.Memory package to include some monitoring information like in > the following code. Some may not like it but it get the job done. [...] > =A0 begin > =A0 =A0 Put ( "Before create Integer :=3D " ) ; > =A0 =A0 S_IO.Put ( Stack_Monitor ) ; > =A0 =A0 A :=3D new Integer ; > =A0 =A0 Put ( " after create operation :=3D " ) ; > =A0 =A0 S_IO.Put ( Stack_Monitor ) ; [...] As your example shows, your technique does not address the OP's problem; it monitors heap allocations (done via new), not the stack (done by declaring variables in subprograms). -- Ludovic Brenta.