[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: garbage collection thoughts... again?!
- From: rlake@...
- Date: Thu, 29 May 2003 15:26:17 -0500
> I've often wondered if it were possible to design a memory such that
> pointers are not a number but an open circuit. Close the circuit and
> the power to the objects' "live" bits turns off and they cease to
> exist. More of a metaphor than something that could be implemented
> directly. But some way of using hardware circuits to do your pointer
> tracing at the speed of light.
It is certainly possible to design a memory which helps with garbage
collection. It doesn't require much magic: the main thing is to have
a bit which distinguishes pointers from other data; a nice addition
is to be able to do writer barriers (or even read barriers, which are
practical in hardware). Given a hardware write barrier and a little
bit of smarts, you could do most of mark-sweep without touching the
CPU; mass produced "smart memory" would not cost more than 10% more
than existing memory, and possibly less.
If you look at progress in video cards, and think about memory which
would support garbage collection, you would probably rapidly realise
that the only reason we don't have smart memory is that so many
mainstream programmers rile up at the idea of garbage collection.
Or in other words, if most programmers used garbage collection
(with its consequent improvement on stability and resource consumption
to say nothing of reduced buffer overflow errors and general program
simplicity) then the market would be brimming with garbage collection
hardware accelerators; we would have two or three competing "Open"
standards on garbage collection acceleration, and there would be
religious wars about whether Microsoft or GNU had the more open
garbage collection standard.
Unfortunately, that is not the world we live in. But it could be.
How's that for a rant, Thatcher?
Rici