comp.lang.ada
 help / color / mirror / Atom feed
From: Mats Weber <Mats.Weber@elca-matrix.ch>
Subject: Re: Stack, task size and DEC Ada
Date: 1997/02/07
Date: 1997-02-07T00:00:00+00:00	[thread overview]
Message-ID: <32FB486D.7B7A@elca-matrix.ch> (raw)
In-Reply-To: 32FA17E0.7566@sema-grenoble.fr


> There is, in the predefined units, a GET_TASK_INFO unit that permits a
> direct access to internal task information. It's thus possible to
> dynamically get the task type name, task id, ... and, most of all, a few
> parameters that seem to be interesting : the task stack top and base.
> 
> I thought to myself with these functions I'll be able to write a small
> routine that declares a (small) variable, I'll take the adress of this
> variable and compare it to either the top or the base of the stack and
> I'll know (nearly) how much of the stack of my task is currently used.
> It was great I could with this little probe evaluate (roughly) the stack
> used in particular places in my program.

You probably don't need this in your code once it is in production.
While you are developping, you can use the VMS Ada debugger to look at
how much stack space each task has consumed and then do the necessary
adjustments. The useful commands are:

<<first set a breakpoint at a point before all the tasks go away>>
dbg> sho task/all                  -- shows the list of all tasks
dbg> sho task/full %task<number>   -- shows info (including stack) about
a task

--Mats




       reply	other threads:[~1997-02-07  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <32FA17E0.7566@sema-grenoble.fr>
1997-02-07  0:00 ` Mats Weber [this message]
1997-02-07  0:00 ` Stack, task size and DEC Ada Corey Ashford
replies disabled

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