comp.lang.ada
 help / color / mirror / Atom feed
From: "Martin Dowie" <martin.dowie@baesystems.com>
Subject: Re: Task storage size
Date: Wed, 30 Jul 2003 08:36:56 +0100
Date: 2003-07-30T08:36:56+01:00	[thread overview]
Message-ID: <3f27751a$1@baen1673807.greenlnk.net> (raw)
In-Reply-To: 3F26D939.3030003@attbi.com

"Robert I. Eachus" <rieachus@attbi.com> 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





  reply	other threads:[~2003-07-30  7:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-29 12:33 Task storage size Martin Dowie
2003-07-29 20:30 ` Robert I. Eachus
2003-07-30  7:36   ` Martin Dowie [this message]
2003-07-30 19:15   ` Randy Brukardt
2003-07-31  7:35     ` Martin Dowie
replies disabled

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