Path: utzoo!attcan!uunet!mcsun!ukc!dcl-cs!aber-cs!pcg From: pcg@aber-cs.UUCP (Piercarlo Grandi) Newsgroups: comp.object Subject: Re: C++ and garbage collection Message-ID: <2030@aber-cs.UUCP> Date: 23 Sep 90 01:42:38 GMT Reply-To: pcg@cs.aber.ac.uk (Piercarlo Grandi) Organization: Dept of CS, UCW Aberystwyth (Disclaimer: my statements are purely personal) Lines: 37 In article <57605@microsoft.UUCP> jimad@microsoft.UUCP (Jim ADCOCK) writes: |The efficiency of conservative garbage collection, measured as the |percentage of garbage that is not reclaimed, has been proven to be quite |high; this is because on many common os/architecture pairs only few |words that are not pointers into the heap look like they were, even |without taking a lot of care, so that little garbage is left |unreclaimed. | | Why? because on many machines the heaps are segments in fairly | high storage addresses, the typical heap address being often a | bit pattern like | | 0x0a00d1fc0 "Just to make things clearer" -- you're assuming you're running on machines with 32-bit integers, and 32-bit linear addresses. You are assuming this -- I have written 'on many common os/architecture pairs'. There's at least one large interesting class of machines on which these assumptions fail miserably. Maybe one can be clever enough to find a storage managemen scheme by which integer, string or float values are not easily mistaken with addresses also for this one large interesting (for marketing departments only, I surmise :->) class of machines -- or may be not. I guess that for the large interesting class of machines and pseudo os architectures you might be thinking about this can be done with fairly good efficiency. Especially if you can make the storage allocator and compiler cooperate. -- Piercarlo "Peter" Grandi | ARPA: pcg%uk.ac.aber.cs@nsfnet-relay.ac.uk Dept of CS, UCW Aberystwyth | UUCP: ...!mcsun!ukc!aber-cs!pcg Penglais, Aberystwyth SY23 3BZ, UK | INET: pcg@cs.aber.ac.uk