writeImageFile() without snapshot()?

Yoshiki Ohshima yoshiki at squeakland.org
Fri Oct 7 21:41:13 UTC 2005


  Hello,

> >> Mmmm, I have thought about doing a full GC without compacting,  
> >> that would save time. Anyone consider if that would work?
> >>
> > Well, to do a full gc we have to scan the entire object memory,  
> > mark&sweep style, and compacting after that is what gets the dead  
> > memory out of the way. Leaving free chunks lying around might not  
> > actually kill you but it seems a bit pointless. You're going to  
> > have to do it at some point anyway.
> 
> Well, for my very specific goal of writing an image in the background  
> it would be very useful... I'm happy to do the compacting at some  
> point anyway, as long as it's not during the few seconds that the OS  
> is trying its best to run two processes concurrently using the same  
> memory pages.

  Mark&sweep phase mutates the object headers, so almost of virtual
memory pages (4k bytes or so) are "modified" even if you avoid the
compaction.  Not doing compaction wouldn't change it.

  Having a "full GC, fork and let the child write image to file"
should work, and the set of pages tainted in the period of concurrent
run may not be so big, actually.

-- Yoshiki



More information about the Squeak-dev mailing list