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)
 * 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.


No differences found