do I have to garbageCollect every time I create a large object?

Henrik Gedenryd Henrik.Gedenryd at lucs.lu.se
Thu Aug 9 15:31:28 UTC 2001


Stephen Pair wrote:

> 
> Since allocating and deallocating huge objects is probably not something
> that will be done frequently, the current situation may be acceptable
> (just create the new object and do a full gc or two).  But, it seems
> like there should be some way to make incremental GC quickly determine
> that a large object should be moved to old space (perhaps without
> needing a full GC).
> 
> - Stephen

Wouldn't it be sufficient to put the huge object first in young space? Then
it wouldn't have to be moved on successive incr. gc:s (I suspect this huge
move is what is taking up so much time).

This gave me a second idea. What if you perform a gc just before allocating
the huge obj? If that would put it first in young space then it wouldn't be
moved in later incremental gc:s.

Am I missing something here?

Henrik






More information about the Squeak-dev mailing list