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,ASCII-7-bit X-Google-Thread: 103376,7caa1b2a6d36aa0e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-30 00:40:06 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!newsfeed.mathworks.com!nntp.abs.net!lore.csc.com!baen1673807.greenlnk.net!baen1673807!not-for-mail From: "Martin Dowie" Newsgroups: comp.lang.ada Subject: Re: Task storage size Date: Wed, 30 Jul 2003 08:36:56 +0100 Organization: BAE SYSTEMS Message-ID: <3f27751a$1@baen1673807.greenlnk.net> References: <3f266925$1@baen1673807.greenlnk.net> <3F26D939.3030003@attbi.com> NNTP-Posting-Host: 20.44.240.6 X-Trace: lore.csc.com 1059550656 3813 20.44.240.6 (30 Jul 2003 07:37:36 GMT) X-Complaints-To: abuse@news.csc.com NNTP-Posting-Date: Wed, 30 Jul 2003 07:37:36 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Original-NNTP-Posting-Host: glkc1363740.sd.edinbr.gmav.gecm.com X-Original-Trace: 30 Jul 2003 08:34:50 +0100, glkc1363740.sd.edinbr.gmav.gecm.com Xref: archiver1.google.com comp.lang.ada:40988 Date: 2003-07-30T08:36:56+01:00 List-Id: "Robert I. Eachus" wrote in message news:3F26D939.3030003@attbi.com... > Martin Dowie wrote: > > How can I create many instances of a task type with different Storage_Size > > values? > > > > I can set the priority of each by parameterizing the task type, e.g. > > task type A_Task (Priority : System.Priority := System.Default_Priority); > > but I can't see any way of having different Storage_Size's... > > You can't. Didn't think so :-( > But what are you trying to do? Usually if you have lots of tasks and > need to manage their storage you put the larger objects on the heap. I'd > be interested in seeing what you are doing, if you do need different > stack sizes for some reason. > > Some implementations may have a local heap for each task, but if your > implementation does, then you can create storage pools that are program > wide. However, I usually find that when I am creating large objects in > tasks, they have to be on the system heap, since the type outlasts the task. I have a number of tasks that service a number of (almost) identical devices. The devices return sensor data, some return _lots_ of data other hardly any. The actual processing for each device is _almost_ the same - hence the hope of using a single task type. Actually it is a task type in a generic - so that a callback can provide to slightly different processing required. I think what I'll do is instantiate different versions with different Storage_Size's but with all remaining generic formal parameters the same. Not ideal but it will do. Cheers