General Problems for GC'ed Applications?

Sean Kelly sean at f4.ca
Thu Jul 27 13:51:38 PDT 2006


Frits van Bommel wrote:
> Sean Kelly wrote:
>> By the way, there's no reason that even a full collect must swap all 
>> 0.8 GB back in.  Some GCs use an alternate approach where pages are 
>> scanned and marked stale when the VMM swaps them to disk, so no page 
>> faults occur on collection runs.
> 
> I only know of one such collector, and it required a specially patched 
> (Linux) kernel that notifies a process before it swaps its pages to disk 
> and allows it to specify which pages to swap (since it touches the pages 
> on receiving the swap warning, which for a normal LRU-like scheme stops 
> it from being swapped).

Yes, the scheme isn't supported everywhere, though I had thought it was 
possible on Linux without a kernel patch.

> Also, that particular GC would sometimes do an actual full collect of 
> the memory, since otherwise swapped-out garbage might never be collected.

True.  It would be somewhat similar to a generational GC in some 
respects, with stale pages representing "mature" data.


Sean



More information about the Digitalmars-d mailing list