comp.lang.ada
 help / color / mirror / Atom feed
From: Mats Weber <Mats.Weber@elca-matrix.ch>
Subject: Re: for S'Storage_Size ...
Date: 1997/02/17
Date: 1997-02-17T00:00:00+00:00	[thread overview]
Message-ID: <33086E64.185B@elca-matrix.ch> (raw)
In-Reply-To: 01bc1c0e$bf67c4e0$829d6482@joy.ericsson.se


Jonas Nygren wrote:

> A Storage_Error will be generated when the fourth Sub_Task is allocated!

See my other post about task types and pointers.

> If I change the 'for ... use ...' to add an extra 5 byte per Sub_Task
> object all works as expected. What could be wrong?

When you give storage size for a collection, some additional space is
needed by the implementation to manage the collection (free lists,
etc.). That additional size is or is not (implementation dependent, I
think) included in the storage size you give. So you have to give your
collections some extra space if you want your program to be portable. 

For fixed size types, I think it would be nice to be able to specify the
size of the collection in number of objects rather than storage units.




  reply	other threads:[~1997-02-17  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-16  0:00 for S'Storage_Size Jonas Nygren
1997-02-17  0:00 ` Mats Weber [this message]
1997-02-17  0:00 ` Robert Dewar
replies disabled

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