drop generation 1/2 except in incremental mode

Originally, generation 1/2 was intended to delay major
collections when the heap is especially large. It doesn't
seem to be effective in that case, and it can slow down
minor GCs, so continue to use it only in incremental
mode (where it helps significantly with fragmentation).
This commit is contained in:
Matthew Flatt 2015-12-19 11:41:03 -07:00
parent 6957780cd5
commit 9711000b70

View File

@ -252,10 +252,8 @@ MAYBE_UNUSED static void GCVERBOSEprintf(NewGC *gc, const char *fmt, ...) {
#define HIGH_FRAGMENTATION_RATIO 2
/* Whether to use a little aging, moving gen-0 objects to a
gen-1/2 space; by default, enabled when memory use is high
enough: */
#define AGE_GEN_0_TO_GEN_HALF(gc) (((gc)->memory_in_use > (GEN0_MAX_SIZE * 8)) \
|| (gc)->started_incremental)
gen-1/2 space: */
#define AGE_GEN_0_TO_GEN_HALF(gc) ((gc)->started_incremental)
/* Incremental mode */
static int always_collect_incremental_on_minor = 0;