[Gc] Use Case for Incremental GC
bruce at hoult.org
Wed May 12 04:40:09 PDT 2010
In my opinion: never.
Incremental GC is inherently slower than non-incremental, so you don't
want it in long running non-interactive programs.
You can only do a certain number of incremental GCs before you have to
do a full one, so it's no use in video games that don't want to drop
frames. You either make sure that a full GC is fast enough to fit into
a frame time (which is usually the case with modern computers,
especially if you make good use of GC_malloc_atomic()), or else you
write your animation loop in such a way that it doesn't GC at all e.g.
by preallocating everything.
Note that in BDW GC the sweep phase is incremental and distributed
fairly equally throughout the running of the mutator anyway, and it is
only the mark phase that stops the world.
On Wed, May 12, 2010 at 11:14 PM, Volkan YAZICI <yazicivo at ttmail.com> wrote:
> What are the typical use cases/scenarios for incremental garbage
> collection? For which malloc/free patterns I should prefer incgc over
> default scheme?
> Gc mailing list
> Gc at linux.hpl.hp.com
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
More information about the Gc