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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,434a111995b97e2f X-Google-Attributes: gid103376,public From: Mats Weber Subject: Re: Stack, task size and DEC Ada Date: 1997/02/07 Message-ID: <32FB486D.7B7A@elca-matrix.ch>#1/1 X-Deja-AN: 215303919 references: <32FA17E0.7566@sema-grenoble.fr> content-type: text/plain; charset=us-ascii organization: ELCA Matrix SA mime-version: 1.0 reply-to: Mats.Weber@elca-matrix.ch newsgroups: comp.lang.ada x-mailer: Mozilla 3.01 (Macintosh; I; PPC) Date: 1997-02-07T00:00:00+00:00 List-Id: > 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: <> dbg> sho task/all -- shows the list of all tasks dbg> sho task/full %task -- shows info (including stack) about a task --Mats