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: 10ad19,23963231b5359f74 X-Google-Attributes: gid10ad19,public X-Google-Thread: 101deb,23963231b5359f74 X-Google-Attributes: gid101deb,public X-Google-Thread: 103376,23963231b5359f74 X-Google-Attributes: gid103376,public X-Google-Thread: 1073c2,23963231b5359f74 X-Google-Attributes: gid1073c2,public X-Google-Thread: 10a146,23963231b5359f74 X-Google-Attributes: gid10a146,public X-Google-Thread: 107a89,23963231b5359f74 X-Google-Attributes: gid107a89,public X-Google-ArrivalTime: 2001-06-10 06:15:41 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed.mesh.ad.jp!sjc-peer.news.verio.net!news.verio.net!iad-read.news.verio.net.POSTED!kilgallen From: Kilgallen@eisner.decus.org.nospam (Larry Kilgallen) Newsgroups: comp.lang.ada,comp.lang.awk,comp.lang.clarion,comp.lang.java.programmer,comp.lang.pl1,comp.lang.vrml Subject: Re: Memory Allocation without pointer arithmetic ? (was: Long names...) Message-ID: <$l53AZgRoQvs@eisner.encompasserve.org> References: <9f2nks$ibd$0@dosa.alt.net> <3B177EF7.2A2470F4@facilnet.es> <9f8b7b$h0e$1@nh.pace.co.uk> <9f8r0i$lu3$1@nh.pace.co.uk> <9fgagu$6ae$1@nh.pace.co.uk> <9fjgha$blf$1@nh.pace.co.uk> <35mqhtkdfma2rggv1htcaq6vfn2ihs67a1@4ax.com> <9fli1b$4aa$1@nh.pace.co.uk> You misunderstand the question. It is not a matter of how to allocation memory in a PL/I program. The question is whether it is possible for the PL/I runtime system implementation of memory allocation to be accomplished without use of pointer arithmetic. The PL/I implementation with which I am most familiar relies on the operating system (not written in PL/I) for memory allocation, so provides no guidance. There is a problem with cross-posted topics. The most I could do would be to pull this particular response from the PL/I group, but that would not stop all the other ones, and this reponse is the one that _should_ be relevant to PL/I. Larry Kilgallen In article <9fv5ll$b0k$1@sshuraab-i-1.production.compuserve.com>, "Mark Yudkin" writes: > And since any PL/I programmer would just say AREAs and why don't you RTFM? - > you can pull it from comp.lang.pl1 too. > > "Larry Kilgallen" wrote in message > news:9BiaJoj4VeFk@eisner.encompasserve.org... >> 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 ? > > -- ============================================================================== Great Inventors of our time: Al Gore -> Internet; Sun Microsystems -> Clusters ==============================================================================