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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 101deb,23963231b5359f74 X-Google-Attributes: gid101deb,public X-Google-Thread: 1073c2,23963231b5359f74 X-Google-Attributes: gid1073c2,public X-Google-Thread: 107a89,23963231b5359f74 X-Google-Attributes: gid107a89,public X-Google-Thread: 103376,23963231b5359f74 X-Google-Attributes: gid103376,public X-Google-Thread: 10a146,23963231b5359f74 X-Google-Attributes: gid10a146,public X-Google-ArrivalTime: 2001-06-09 08:00:07 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: gazelle@yin.interaccess.com (Kenny McCormack) Newsgroups: comp.lang.ada,comp.lang.clarion,comp.lang.java.programmer,comp.lang.pl1,comp.lang.vrml Subject: Re: Memory Allocation without pointer arithmetic ? (was: Long names...) Date: 9 Jun 2001 09:58:11 -0500 Organization: The official candy of the new Millennium Message-ID: <9ftdi3$sc9$1@yin.interaccess.com> References: <9f2nks$ibd$0@dosa.alt.net> <9fli1b$4aa$1@nh.pace.co.uk> Reply-To: gazelle@interaccess.com X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:8490 comp.lang.clarion:21546 comp.lang.java.programmer:74997 comp.lang.pl1:953 comp.lang.vrml:3690 Date: 2001-06-09T09:58:11-05:00 List-Id: In article <9BiaJoj4VeFk@eisner.encompasserve.org>, Larry Kilgallen wrote: >In article <3B219DB3.4BF2A68A@acm.org>, Patricia Shanahan writes: >> James Kanze wrote: >>> >>> Pete Thompson wrote: >>> >>> [...] >>> > Well, sure. Pointer arithmetic in C/C++ is inherently unsafe and >>> > encourages obfuscation. However, it also promotes flexibility. >>> >>> Just curious, but what can you do with pointer arithmetic in C/C++ >>> that you couldn't do otherwise, in a cleaner fashion? >> ... >> >> Manage memory. A memory allocator, such as malloc, or the corresponding >> kernel code, or the code underlying "new", has a split view of memory. >> It must perform calcuations to determine where to put the the newly >> created object. It must return a pointer to it. > >That is an interesting example, even though it should only occur once >per operating system. I have never tried to do that in Ada. > >Does anyone have experience trying to subdivide memory objects (the >free pool) without using the equivalent of pointer arithmetic ? You know, I wish you guys would take comp.lang.awk out of this newsgroup list for this ever changing thread (that started out being about long variable names). It never had anything to do with AWK and it keeps changing names, thereby thwarting my killfile...