comp.lang.ada
 help / color / mirror / Atom feed
* Re[2]: Storage Pool
@ 2001-06-13 21:22 ANH_VO
  2001-06-14 14:57 ` Robert A Duff
  0 siblings, 1 reply; 3+ messages in thread
From: ANH_VO @ 2001-06-13 21:22 UTC (permalink / raw)
  To: comp.lang.ada

Bob,

Could you elaborate more on your NO answer? I do not have enough evidence to say
either way. However, based on test results from GNAT 3.13p, the answer is yes. I
need to conduct further test using APEX and ObjectAda. If it works as GNAT, I
will post the codes.

A. Vo

____________________Reply Separator____________________
Subject:    Re: Storage Pool
Author: Robert A Duff <bobduff@world.std.com>
Date:       6/13/01 10:55 PM

ANH_VO@udlp.com writes:

> Is it correct to assume that Size_In_Storage_Element mod Alignment = 0 for
both
> subprograms Allocate and Deallocate for any type derived from
Root_Storage_Pool
> as shown below

No.  But you can write a storage pool that requires that, and only use
it for types that obey that rule.

I have written storage pools that assume Alignment = 4 (and
pragma-assert so).

- Bob
_______________________________________________



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Re[2]: Storage Pool
  2001-06-13 21:22 Re[2]: Storage Pool ANH_VO
@ 2001-06-14 14:57 ` Robert A Duff
  0 siblings, 0 replies; 3+ messages in thread
From: Robert A Duff @ 2001-06-14 14:57 UTC (permalink / raw)


ANH_VO@udlp.com writes:

> Could you elaborate more on your NO answer? I do not have enough evidence to say
> either way. However, based on test results from GNAT 3.13p, the answer is yes. I
> need to conduct further test using APEX and ObjectAda. If it works as GNAT, I
> will post the codes.

I don't think the RM guarantees that Size_In_Storage_Element mod
Alignment = 0, but you may be right that it's always true in practise.

In any case, I think there's nothing wrong with writing a storage pool
that *requires* this property (or any other property), and tell users
of the pool that they must obey.

- Bob



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re[2]: Storage Pool
@ 2001-06-15 11:28 ANH_VO
  0 siblings, 0 replies; 3+ messages in thread
From: ANH_VO @ 2001-06-15 11:28 UTC (permalink / raw)
  To: comp.lang.ada

Randy,

Thank you for your advice. I have decided to abandone this idea. Instead, I
always calculate the alignment in any circumtances.

Anh Vo

____________________Reply Separator____________________
Subject:    Re: Storage Pool
Author: "Randy Brukardt" <randy@rrsoftware.com>
Date:       6/14/01 8:02 PM

ANH_VO@udlp.com wrote in message ...
>Is it correct to assume that Size_In_Storage_Element mod Alignment = 0
for both
>subprograms Allocate and Deallocate for any type derived from
Root_Storage_Pool
>as shown below


I don't think you should assume anything not required by the reference
manual. And certainly this is not required by the reference manual.
Unless you want your code to work only with a particular implementation.


         Randy.


GNAT /= Ada 95




_______________________________________________
comp.lang.ada mailing list
comp.lang.ada@ada.eu.org
http://ada.eu.org/mailman/listinfo/comp.lang.ada
Received: from portal.udlp.com ([10.1.1.245]) by ccmail.udlp.com with SMTP
  (IMA Internet Exchange 3.14) id 006D97CD; Thu, 14 Jun 2001 20:06:18 -0500
Received: from portal.udlp.com (root@localhost)
    by portal.udlp.com with ESMTP id UAA12331
    for <anh_vo@udlp.com>; Thu, 14 Jun 2001 20:06:18 -0500 (CDT)
Received: from ada.eu.org (marvin.enst.fr [137.194.161.2])
    by portal.udlp.com with ESMTP id UAA12327
    for <anh_vo@udlp.com>; Thu, 14 Jun 2001 20:06:17 -0500 (CDT)
Received: from marvin.enst.fr (localhost [127.0.0.1])
    by ada.eu.org (Postfix) with ESMTP
    id 554FF190A4; Fri, 15 Jun 2001 03:06:18 +0200 (CEST)
Path:
enst.fr!enst!fr.usenet-edu.net!usenet-edu.net!news-spur1.maxwell.syr.edu!news.ma
xwell.syr.edu!howland.erols.net!portc.blue.aol.com.MISMATCH!portc03.blue.aol.com
!peerfeed.news.psi.net!filter.news.psi.net!reader.dist.news.psi.net!client!not-f
or-mail
From: "Randy Brukardt" <randy@rrsoftware.com>
Newsgroups: comp.lang.ada
References: <mailman.992469018.6376.comp.lang.ada@ada.eu.org>
Subject: Re: Storage Pool
Lines: 21
X-Newsreader: Microsoft Outlook Express 4.72.3612.1700
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500
Message-ID: <x8dW6.53$504.1955@client>
NNTP-Posting-Host: 156.46.62.124
X-Trace: client 992566941 156.46.62.124 (Thu, 14 Jun 2001 21:02:21 EDT)
NNTP-Posting-Date: Thu, 14 Jun 2001 21:02:21 EDT
Xref: enst.fr comp.lang.ada:90016
To: comp.lang.ada@ada.eu.org
Sender: comp.lang.ada-admin@ada.eu.org
Errors-To: comp.lang.ada-admin@ada.eu.org
X-BeenThere: comp.lang.ada@ada.eu.org
X-Mailman-Version: 2.0.4
Precedence: bulk
Reply-To: comp.lang.ada@ada.eu.org
List-Help: <mailto:comp.lang.ada-request@ada.eu.org?subject=help>
List-Post: <mailto:comp.lang.ada@ada.eu.org>
List-Subscribe: <http://ada.eu.org/mailman/listinfo/comp.lang.ada>,
    <mailto:comp.lang.ada-request@ada.eu.org?subject=subscribe>
List-Id: comp.lang.ada mail<->news gateway <comp.lang.ada.ada.eu.org>
List-Unsubscribe: <http://ada.eu.org/mailman/listinfo/comp.lang.ada>,
    <mailto:comp.lang.ada-request@ada.eu.org?subject=unsubscribe>
List-Archive: <http://ada.eu.org/pipermail/comp.lang.ada/>
Date: Thu, 14 Jun 2001 20:02:39 -0500



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-06-15 11:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-13 21:22 Re[2]: Storage Pool ANH_VO
2001-06-14 14:57 ` Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
2001-06-15 11:28 ANH_VO

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