gencgc: reclaim space more aggressively
authorNikodemus Siivola <nikodemus@random-state.net>
Fri, 30 Mar 2012 21:56:44 +0000 (00:56 +0300)
committerNikodemus Siivola <nikodemus@random-state.net>
Fri, 13 Apr 2012 09:57:17 +0000 (12:57 +0300)
commit6b1b11a6c51e1c29aee947f1fde7f91651ca3763
treeac385ac935afbad009796c3f7b8c89323d1b68ba
parent09cbe389732a42a2eaeaa5fbe3847a95a10c996e
gencgc: reclaim space more aggressively

 * When considering auto_gc_trigger, take the number of bytes about to be
   allocated into account.

 * If bytes_consed_between_gcs is more than the amount of free heap, set next
   GC to occur when half of the remaining free heap has been consumed.

 * Keep track of the size of the largest object allocated between two GCs.
   When collecting garbage, if there isn't enough space to allocate at least
   two such objects before collecting the last generation due a collection,
   extend the collection by one extra generation.

   This works around our tendency to immediately promote large objects to
   generation 1, due to auto_gc_trigger causing a GC _after_ the allocation.

 Fixes lp#936304.
NEWS
src/runtime/gencgc.c
tests/gc.impure.lisp