diff options
author | Peter Zhu <[email protected]> | 2021-06-09 13:31:44 -0400 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2021-06-09 14:16:39 -0400 |
commit | 8a46b480a719a419e1d596ce20740da020501003 (patch) | |
tree | 0b35db3ceb1d444c2aaad70e8e518aa1e0a0eaba /gc.c | |
parent | fa340dd9f1ce410360474ca7b07d0af8968599c7 (diff) |
Refactor gc_marks_start_heap to only configure heap
Move the non-heap related configurations to gc_marks_start.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4560
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 23 |
1 files changed, 13 insertions, 10 deletions
@@ -5536,6 +5536,19 @@ gc_sweep_start_heap(rb_objspace_t *objspace, rb_heap_t *heap) heap->free_pages = NULL; #if GC_ENABLE_INCREMENTAL_MARK heap->pooled_pages = NULL; +#endif +} + +#if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 4 +__attribute__((noinline)) +#endif +static void +gc_sweep_start(rb_objspace_t *objspace) +{ + gc_mode_transition(objspace, gc_mode_sweeping); + gc_sweep_start_heap(objspace, heap_eden); + +#if GC_ENABLE_INCREMENTAL_MARK objspace->rincgc.pooled_slots = 0; #endif @@ -5570,16 +5583,6 @@ gc_sweep_start_heap(rb_objspace_t *objspace, rb_heap_t *heap) } } -#if defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ == 4 -__attribute__((noinline)) -#endif -static void -gc_sweep_start(rb_objspace_t *objspace) -{ - gc_mode_transition(objspace, gc_mode_sweeping); - gc_sweep_start_heap(objspace, heap_eden); -} - static void gc_sweep_finish(rb_objspace_t *objspace) { |