[gclist] half flips

James McCartney asynth at io.com
Tue Aug 3 12:26:35 PDT 2004


On Aug 3, 2004, at 10:49 AM, Mark Stuart Johnstone wrote:

> Hi,
>
> It has been over 6 years since I looked at this, so my thinking may be
> a little rusty.
>
> What you are suggesting is an extension to our idea of allocating new
> object black.  I believe that your idea will work at the cost of
> additional memory (but less CPU).  It would have the disadvantage
> (compared to the scheme we discussed) of needing to trace all of the
> objects during one flip (one of your major flips), which makes hard
> real-time properties difficult to maintain.

The problem with allocating black at least for me, is when I allocate 
new objects they immediately get initialized with other objects, some 
of which are white. This causes the greying of far too many objects 
many of which would have been garbage. I tried it and it was very 
expensive both in time and space. If I allocate white then I can 
initialize the object without using the write barrier. Most slots are 
filled at initialization and do not change often. This has turned out 
to be much cheaper.

In fact allocating black seems directly opposed to the generational 
strategy. With generations you scan the new objects and ignore the old 
since they are more likely to have survived. With allocate-black you 
scan the old objects (since they became white at last flip) and ignore 
the new ones (since they were allocated black). That just seems 
backwards.

>
> For more discussion on this, see my dissertation at:
> http://www.cs.utexas.edu/users/oops/papers.html
> Pages 162-166 talk about this a little.  It is currently in ps format,
> but I'll see about converting it to a pdf.
>
> By the way, my last name is Johnstone (with an "e" at the end 8-).

Sorry that was just a typo. I knew that. We've emailed before.
I used to work in Astronomy at UT and once introduced myself to Paul 
Wilson at China Inn having lunch when I overheard him talking about 
allocators.

> Its nice to know that someone is still looking at this.  It is easy to
> get the idea that ones Ph.D. years were a waste of time.
>
> --Mark



More information about the GClist mailing list