Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!samsung!aplcen!haven!uvaarpa!mcnc!decvax!crltrx!max.crl.dec.com!jg From: jg@max.crl.dec.com (Jim Gettys) Newsgroups: comp.windows.x Subject: Re: 29 bit resource id and garbage collection Message-ID: <1123@crltrx.crl.dec.com> Date: 2 Nov 89 14:39:25 GMT References: <67055@philabs.Philips.Com> Sender: news@crltrx.crl.dec.com Reply-To: jg@max.crl.dec.com (Jim Gettys) Distribution: na Organization: DEC Cambridge Research Lab Lines: 18 Languages like lisp, CLU, etc. often distinguish an pointer to some object from a integer internally by having the high order bit(s) of the integer set. Among other things, this means that when a garbage collector goes rummaging around to find garbage, it can tell objects that may need garbage collection from integers on the stack. Some languages/implementations use as many as the three bits of a word for this purpose. But the real point is that if an ID could have one of these bits on, then all ID's in lisp might have to be represented by bignums, causing a substantial performance penalty for such languages. Better to just avoid generating problems for people working in those languages by requiring that ID's not use those bits. - Jim Gettys