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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e8339c7ac4436cbf X-Google-Attributes: gid103376,public From: Mats Weber Subject: Re: for S'Storage_Size ... Date: 1997/02/17 Message-ID: <33086E64.185B@elca-matrix.ch>#1/1 X-Deja-AN: 219469744 References: <01bc1c0e$bf67c4e0$829d6482@joy.ericsson.se> Content-Type: text/plain; charset=us-ascii Organization: ELCA Matrix SA Mime-Version: 1.0 Reply-To: Mats.Weber@elca-matrix.ch Newsgroups: comp.lang.ada X-Mailer: Mozilla 3.01 (Macintosh; I; PPC) Date: 1997-02-17T00:00:00+00:00 List-Id: 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.