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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3d0afc9a32541780 X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Task storage_size on task types with gnat Date: 1998/12/14 Message-ID: #1/1 X-Deja-AN: 422237250 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: <3673E6EF.7EDFBDB0@magic.fr> Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1998-12-14T00:00:00+00:00 List-Id: Pascal MALAISE (malaise@magic.fr) wrote: : I have a task which needs a large (at least more than the deafult) : stack. : -- In fact, it dynamically instanciates a generic. : With gnat 3.10p (on linux) I cannot specify my task storage_size: : task STUFF is : ... : end STUFF; : for STUFF'STORAGE_SIZE use 4*1024*1024; : --> storage size cannot be given for "STUFF" In Ada 95, storage size for a task is specified by a pragma rather than a rep clause, which goes *inside* the task spec: task Stuff is pragma Storage_Size(4*1024*1024); ... end Stuff; In Ada 83, storage size was only specifiable for a task subtype, via a rep clause. In Ada 95, we switched over to a pragma so that the Storage_Size could depend on the discriminants of the task, if any. -Tucker Taft stt@inmet.com : But if I use a task type: : task type STUFF_T is : ... : end STUFF_T; : for STUFF_T'STORAGE_SIZE use 4*1024*1024; : STUFF : STUFF_T; : It works OK. : Does anyone know - why the first approach is refused? : - a way to avoid a task type (I don't realy mind : though). : -- : Pascal MALAISE : (priv) mailto:malaise@magic.fr : (prof) mailto:malaise@fr.airsysatm.thomson-csf.com -- -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Burlington, MA USA An AverStar Company