diff options
| -rw-r--r-- | src/gc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -344,7 +344,7 @@ add_heap(mrb_state *mrb, mrb_gc *gc) #define DEFAULT_GC_INTERVAL_RATIO 200 #define DEFAULT_GC_STEP_RATIO 200 -#define DEFAULT_MAJOR_GC_INC_RATIO 200 +#define MAJOR_GC_INC_RATIO 200 #define is_generational(gc) ((gc)->generational) #define is_major_gc(gc) (is_generational(gc) && (gc)->full) #define is_minor_gc(gc) (is_generational(gc) && !(gc)->full) @@ -1209,7 +1209,7 @@ mrb_incremental_gc(mrb_state *mrb) } if (is_major_gc(gc)) { - gc->majorgc_old_threshold = gc->live_after_mark/100 * DEFAULT_MAJOR_GC_INC_RATIO; + gc->majorgc_old_threshold = gc->live_after_mark/100 * MAJOR_GC_INC_RATIO; gc->full = FALSE; } else if (is_minor_gc(gc)) { @@ -1248,7 +1248,7 @@ mrb_full_gc(mrb_state *mrb) gc->threshold = (gc->live_after_mark/100) * gc->interval_ratio; if (is_generational(gc)) { - gc->majorgc_old_threshold = gc->live_after_mark/100 * DEFAULT_MAJOR_GC_INC_RATIO; + gc->majorgc_old_threshold = gc->live_after_mark/100 * MAJOR_GC_INC_RATIO; gc->full = FALSE; } @@ -1449,7 +1449,7 @@ change_gen_gc_mode(mrb_state *mrb, mrb_gc *gc, mrb_bool enable) } else if (!is_generational(gc) && enable) { incremental_gc_until(mrb, gc, MRB_GC_STATE_ROOT); - gc->majorgc_old_threshold = gc->live_after_mark/100 * DEFAULT_MAJOR_GC_INC_RATIO; + gc->majorgc_old_threshold = gc->live_after_mark/100 * MAJOR_GC_INC_RATIO; gc->full = FALSE; } gc->generational = enable; |
