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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,39573b6047875874 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-21 07:59:51 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news-FFM2.ecrc.net!news.iks-jena.de!not-for-mail From: Lutz Donnerhacke Newsgroups: comp.lang.ada Subject: Re: Unchecked_Conversion and alignment Date: Tue, 21 Jan 2003 15:59:50 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: <3e2cf0e4$0$33922$bed64819@news.gradwell.net> NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1043164790 24927 217.17.192.37 (21 Jan 2003 15:59:50 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Tue, 21 Jan 2003 15:59:50 +0000 (UTC) User-Agent: slrn/0.9.7.4 (Linux) Xref: archiver1.google.com comp.lang.ada:33301 Date: 2003-01-21T15:59:50+00:00 List-Id: * Stephen Leake wrote: > porton@ex-code.com (Victor Porton) writes: >> So, it appears impossible to keep several objects of arbitrary types in >> an array of an array of System.Storage_Elements.Storage_Array (as these >> alignments are not necessarily equal). > > You can probably get what you really want via > Address_To_Access_Conversions. No. Several architectures gracefully allows misaliged access to structured data, but this is not generally true. It might cause some nifty errory especially when timing and access sequences (hardware) are important. If you want to 'map' data, you have to ensure yourself, that the mapped structure has an natural alignment of one. Otherwise you have to copy or reconstruct the data in question from the alignedment independed pieces. > It would help if you said why you want to keep object in arrays of > Storage_Elements. Most cases occurs when reading stream data from network devices.