oo hardware

Tim Rowledge tim at sumeru.stanford.edu
Sat Mar 22 18:53:14 UTC 2003


Marcel Weiher <marcel at metaobject.com> wrote:
[snip]
> Hmm...if you have a 32 bit reference count field, a 32 bit address 
> space for your objects and a minimum of 4 bytes for your objects, then 
> I would think reference counting *is* exact, because you can accomodate 
> 2^32 references to your object but can never have that many objects in 
> your system.  (Assuming that the number of external references is small)
A 32bit refCt field is effectively infinite for a 32bit address space -
in fact it would probably be effectively infinite for about 36bits of
addresspace given likely object average sizes. BUT, and this is a big
'but' (like, say, jennifer lopez) given typical object sizes (I think we
can still guess at 16 bytes as the upper number for that) we are then
spending 4 more bytes for the refct field, ie 20% 'wastage'. Under some
circumstances and with modern systems and memory costs maybe that isn't
a terrible thing anymore? Of course, it adds memory bandwidth costs as
well (you have to read/dec & read/inc refct fields for the two objects
involved anytime you write an oop somewhere) which upsets caches and so
on.

If I remember right though, Dis/Inferno/whatever is suposed to be aimed
at the embedded area and memory is definitely still a concern. And it
simply annoys me when a professionally published paper by people as
experienced and well known as Rob Pike get something so basic wrong.
Makes me wonder what else is wrong.

tim
-- 
Tim Rowledge, tim at sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Useful Latin Phrases:- Estne volumen in toga, an solum tibi libet me videre? = Is that a scroll in your toga, or are you just happy to see me?



More information about the Squeak-dev mailing list