[gclist] When to collect.

Brian Hurt brianh@risky.bit3.com
Thu, 20 Nov 1997 09:40:08 -0600 (CST)


On Thu, 20 Nov 1997, Ian Ringrose wrote:

> The other option we could make use of is a callback that is called just
> before a paged is paged out.  If the page was in use by the cache, and not
> dirty, we could just discard it at that point.  A GC could decide to copy
> all of it's live objects to a part filled page, so not having to paged it
> back in on the next GC pass. 

This strikes me as being potientially very dangerous- consider the case 
where the call back wants to copy the few remaining objects to a page 
already paged out.  Or the case where that particular part of the garbage 
collector code has already been paged out.  Such a handler would not dare 
page fault.

> I also get hit by the fact that if I discard a object in the cache that has
> not been used for a long time, the page is marked by the OS as being
> one to keep in RAM as I have just accessed it

This is better handled by providing some "discard page without touching 
it" call.  Not sure what the semantics here would be.

> Ian Ringrose
> ianr@lsl.co.uk


Brian Hurt