Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!apple.com!chewy From: chewy@apple.com (Paul Snively) Newsgroups: comp.sys.mac.programmer Subject: Re: StripAddress() question Message-ID: <11314@goofy.Apple.COM> Date: 19 Nov 90 22:58:38 GMT Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 39 References:<90323.102417CXT105@psuvm.psu.edu> <46697@apple.Apple.COM> In article <46697@apple.Apple.COM> stevec@Apple.COM (Steve Christensen) writes: [Lead-in deleted for brevity's sake] > Generally you only need to call StripAddress if you need to compare two > addresses, since then the full 32 bits is used... This is almost correct. (It's obviously time to clarify my clarifications in the Tech Note.) ;-) If you are comparing two pointers that lie within the same block, you're guaranteed cool regardless, because whether you're doing signed or unsigned math, everything works because the high byte is consistent. The potential problems arise when you are comparing between pointers into _different_ blocks, particularly if: 1) the comparison is signed 2) one of the blocks is locked and 3) the other isn't (Note that I'm assuming 24-bit mode here). So the code in the original post is just fine. Seriously, I _do_ plan to revise the Tech Note yet again, and perhaps rewrite it wholesale in English that's closer to what I just wrote. Sorry 'bout the confusion, __________________________________________________________________________ Paul Snively Macintosh Developer Technical Support Apple Computer, Inc. chewy@apple.com Just because I work for Apple Computer, Inc. doesn't mean that I believe what they believe, or vice-versa. __________________________________________________________________________