From fc85016a322244f10262b6c46b0235f65fb3025d Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 14 Apr 2018 06:09:07 +0900 Subject: Remove `DEFAULT_` from `DEFAULT_MAJOR_GC_INC_RATIO`; ref #3998 Because unlike other GC ratio constants, it's not a default value. --- src/gc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/gc.c b/src/gc.c index 3604066dd..7f735c1fc 100644 --- a/src/gc.c +++ b/src/gc.c @@ -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; -- cgit v1.2.3