Path: utzoo!attcan!uunet!mcsun!ukc!strath-cs!dcl-cs!aber-cs!athene!pcg From: pcg@cs.aber.ac.uk (Piercarlo Grandi) Newsgroups: comp.object Subject: Re: C++ and garbage collection Message-ID: Date: 24 Sep 90 17:10:07 GMT References: <2030@aber-cs.UUCP> Sender: pcg@aber-cs.UUCP Organization: Coleg Prifysgol Cymru Lines: 44 Nntp-Posting-Host: odin In-reply-to: pcg@aber-cs.UUCP's message of 23 Sep 90 01:42:38 GMT I had written, after stating that conservative g.c. in practice, on many popular machine/os combinations, leaves unreclaimed a fairly small percentage of garbage: pcg> Why? because on many machines the heaps are segments in fairly pcg> high storage addresses, the typical heap address being often a pcg> bit pattern like pcg> 0x0a00d1fc0 In article <57605@microsoft.UUCP> jimad@microsoft.UUCP (Jim ADCOCK) comments: jimad> "Just to make things clearer" -- you're assuming you're running jimad> on machines with 32-bit integers, and 32-bit linear addresses. jimad> There's at least one large interesting class of machines on which jimad> these assumptions fail miserably. To this I replied: pcg> I guess that for the large interesting class of machines and pseudo pcg> os architectures you might be thinking about this can be done with pcg> fairly good efficiency. Especially if you can make the storage pcg> allocator and compiler cooperate. "Just to be clearer": _if_ Jim Adcock was referring to that class of machines and operating systems where each memory location has 4096 (2^(32-20)) equivalent addresses, one can conventionally use one of these synonyms to indicate a heap pointer. So for example non-heap pointers may systematically use the 0th synonym, and heap pointers would use the 2048th. Hints of tagging... G.c. support for SIL/MOHLL OO languages (a singleton set) need not be confined to linear address architectures. Naturally there is some problem with mixed model programs, i.e. those that use both far and near pointers at the same time. But using them is always your choice, isn't it, and they are not in C++ anyhow... -- 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