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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,46d460d7f8e56eb6,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-14 08:28:20 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!opentransit.net!jussieu.fr!enst!enst.fr!not-for-mail From: ANH_VO@udlp.com Newsgroups: comp.lang.ada Subject: Re[2]: Re[2]: Storage Pool Date: Thu, 14 Jun 2001 08:21:56 -0500 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 992532498 35241 137.194.161.2 (14 Jun 2001 15:28:18 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Thu, 14 Jun 2001 15:28:18 +0000 (UTC) To: comp.lang.ada@ada.eu.org Return-Path: Content-Description: cc:Mail note part 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 List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:8731 Date: 2001-06-14T08:21:56-05:00 Actually, I already had the alignment rules set like this function Aligned ( Size : System.Storage_Elements.Storage_Count; Alignment : System.Storage_Elements.Storage_Count) return System.Storage_Elements.Storage_Count is begin if Size rem Alignment /= 0 then return Size + Alignment - (Size mod Alignment); else return Size; end if; end Aligned; Then, the actual size is calculated Actual_Size := Aligned (Size_In_Storage_Elements, Aligment); However, if Size_In_Storage_Elements mod Alignment = 0 then Actual_Size = Size_In_Storage_Elements. Thus, I can speed up the process by not calculating the Actual_Size since it is not necessary. Anh Vo ____________________Reply Separator____________________ Subject: Re: Re[2]: Storage Pool Author: Robert A Duff Date: 6/14/01 2:57 PM 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