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-Language: ENGLISH,CP1252 X-Google-Thread: 103376,b37119e58099119 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-21 03:36:46 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!sn-xit-01!supernews.com!newshub2.rdc1.sfba.home.com!news.home.com!enews.sgi.com!telocity-west!TELOCITY!newsrump.sjc.telocity.net!not-for-mail From: "David C. Hoos, Sr." Newsgroups: comp.lang.ada References: <3b08e4c9$1@pull.gecm.com> Subject: Re: 'Storage_Size in Ada95 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MIMEOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: <2d6O6.1310$ce.2870383@newsrump.sjc.telocity.net> X-Trace: NjcgTm9BdXRoVXNlciBURUxPQ0lUWS1SRUFERVJTIDIxNi4yMjcuNDcuNDkgIE1vbiwgMjEgTWF5!IDIwMDEgMDM6MzY6NDYgUERU X-Abuse-Info: Please forward ALL headers when reporting abuse. X-Complaints-To: abuse@telocity.net NNTP-Posting-Date: Mon, 21 May 2001 03:36:46 PDT Date: Mon, 21 May 2001 05:36:42 -0500 Xref: archiver1.google.com comp.lang.ada:7671 Date: 2001-05-21T05:36:42-05:00 List-Id: >From RM95, Annex L: 35 pragma Storage_Size(expression); � See 13.3. And from RM95 3.13: 59 For a prefix T that denotes a task object (after any implicit dereference): 60 T�Storage_Size Denotes the number of storage elements reserved for the task. The value of this attribute is of the type universal_integer. The Storage_Size includes the size of the task�s stack, if any. The language does not specify whether or not it includes other storage associated with the task (such as the �task control block� used by some implementations.) If a pragma Storage_Size is given, the value of the Storage_Size attribute is at least the value specified in the pragma. 61 A pragma Storage_Size specifies the amount of storage to be reserved for the execution of a task. Syntax 62 The form of a pragma Storage_Size is as follows: 63 pragma Storage_Size(expression); 64 A pragma Storage_Size is allowed only immediately within a task_definition. Name Resolution Rules 65 The expression of a pragma Storage_Size is expected to be of any integer type. Dynamic Semantics 66 A pragma Storage_Size is elaborated when an object of the type defined by the immediately enclosing task_definition is created. For the elaboration of a pragma Storage_Size, the expression is evaluated; the Storage_Size attribute of the newly created task object is at least the value of the expression. 67 At the point of task object creation, or upon task activation, Storage_Error is raised if there is insufficient free storage to accommodate the requested Storage_Size. "Martin Dowie" wrote in message news:3b08e4c9$1@pull.gecm.com... > Can someone give me a quick example of the Ada95 way of > allocating storage to for task type? (I've left my Barnes > book at home, doh!) > > e.g the equivilant of Ada83: > > package A is > ... > task type B is > entry C; > end B; > for B'Storage_Size use (Some_Value); > ... > end A; > > Thanks in advance... > > >