Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!rutgers!cmcl2!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.misc Subject: Re: Answers, Chapter 1: TeX (was C's sins... and others) Message-ID: <5222@lanl.gov> Date: 7 Nov 90 22:02:45 GMT References: <6363:Nov720:32:5090@kramden.acf.nyu.edu> Organization: Los Alamos Natl Lab, Los Alamos, N.M. Lines: 16 From article <6363:Nov720:32:5090@kramden.acf.nyu.edu>, by brnstnd@kramden.acf.nyu.edu (Dan Bernstein): > [...] > You are being illogical. ``Must not be arrays though, all them use > 16-bit indexing.'' Just because arithmetic can't take pointers out of > their segments doesn't mean pointers are restricted to a single segment. You're still missing the point. In order to implement a memory manager, it is necessary to _compare_ pointers which are _known_ to point to _different_ data objects. You need to do this, for example, to determine if an object that is being added to the free list is adjacent to existing free list items (so that they can be merged). Because of the ANSI restrictions on pointers, it is not safe to compare them in this way (in fact, neither of the C compilers I have at home do this job with pointers). J. Giles