TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Tucker Taft <[log in to unmask]>
Reply To:
Tucker Taft <[log in to unmask]>
Thu, 6 Jan 2000 14:37:09 -0500
text/plain (38 lines)
Joel Seidman wrote:
> Tuck,
> Thanks for the on-target reply (as usual).
> (I should have mentioned explicitly I'm using VADS (Ada83), which is why I cited the Ada83 RM.)
> To be explicit, in the program I am looking at, the task is terminated before the FREE. I was assuming the FREE (U.D.) was to assure that the memory used for the task stack, which could be several hundred K in this case, would become available for reuse. For my improved understanding, could you clarify your statement that a task object is typically a couple words. I have always thought that the "task object" was the entire stack used by the task, probably because of the association of the storage_size attribute with the task. Are you are saying that is not the case?

The task "object" is generally small, often one or two words.
For example, if you take 'size on a task object, you will typically
get something like 32 or 64 (bits).  The task stack, which is what
Storage_Size specifies, is typically something like 4K(bytes).
If you have a record containing a task object, the record will not
be gigantic just because it contains a task object.  The task stack
is generally stored elsewhere, and managed separately, from the
task object.  In most implementations, there is a third thing, namely
the task "control block" (TCB).  This is typically about 20-40 words
in size.  This is sometimes allocated at the top of the task stack.
Alternatively, it is allocated separately.  It generally can't
be part of the task object because of the paragraph you cited.

Of course, everything having to do with task representation can vary
from one implementation to the next.  I have described a "typical"
implementation.  If you have a well documented storage leak, by all
means contact the vendor (i.e. Rational in this case) and see what
they have to say.  I would also expect there to be some information in
their documentation about task representation.

> -- Joel
-Tucker Taft   [log in to unmask]
Technical Director, Distributed IT Solutions  (
AverStar (formerly Intermetrics, Inc.)   Burlington, MA  USA