diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-04-14 06:09:07 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2018-04-14 06:12:12 +0900 |
| commit | fc85016a322244f10262b6c46b0235f65fb3025d (patch) | |
| tree | cc040fc110a82c1f566a9c2ac707179cce4f7ca7 /src | |
| parent | c6736357a72049a0eb2a31ccabcc3cd2baba7c9e (diff) | |
| download | mruby-fc85016a322244f10262b6c46b0235f65fb3025d.tar.gz mruby-fc85016a322244f10262b6c46b0235f65fb3025d.zip | |
Remove `DEFAULT_` from `DEFAULT_MAJOR_GC_INC_RATIO`; ref #3998
Because unlike other GC ratio constants, it's not a default value.
Diffstat (limited to 'src')
| -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; |
