General Problems for GC'ed Applications?
Frits van Bommel
fvbommel at REMwOVExCAPSs.nl
Thu Jul 27 13:47:29 PDT 2006
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).
So the reason a full collect must swap all 0.8 GB back in might be the
absence of such a patched kernel, for one :). (I wouldn't want to
require a user to patching his OS just to run my GC-ed program)
Also, that particular GC would sometimes do an actual full collect of
the memory, since otherwise swapped-out garbage might never be collected.
More information about the Digitalmars-d
mailing list