diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-27 04:40:13 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-27 04:40:13 +0000 |
commit | 202b4bbe81dc5f5d40df5c779d8f8d20d06e9b70 (patch) | |
tree | 5ff9de965607b1c8d6bc09c07328886f55c6c5f5 | |
parent | 4f517abfdc1ad87886a0f4fc4720a4a859279bb4 (diff) | |
download | ruby-202b4bbe81dc5f5d40df5c779d8f8d20d06e9b70.tar.gz |
gc.c: fix no lazy sweep mode
* gc.c (gc_sweep_rest): sweep rest pages regardless of whether
lazy sweep is enabled or not. based on the patch by Masahiro
Ide at [ruby-dev:48706]. [Bug #10431]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | gc.c | 9 |
2 files changed, 10 insertions, 5 deletions
@@ -1,3 +1,9 @@ +Mon Oct 27 13:40:11 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * gc.c (gc_sweep_rest): sweep rest pages regardless of whether + lazy sweep is enabled or not. based on the patch by Masahiro + Ide at [ruby-dev:48706]. [Bug #10431] + Mon Oct 27 11:18:32 2014 Eric Wong <e@80x24.org> * test/ruby/test_process.rb (test_deadlock_by_signal_at_forking): @@ -700,7 +700,8 @@ VALUE *ruby_initial_gc_stress_ptr = &ruby_initial_gc_stress; #else #define is_incremental_marking(objspace) 0 #endif -#define is_lazy_sweeping(heap) (GC_ENABLE_LAZY_SWEEP && (heap)->sweep_pages != 0) +#define has_sweeping_pages(heap) ((heap)->sweep_pages != 0) +#define is_lazy_sweeping(heap) (GC_ENABLE_LAZY_SWEEP && has_sweeping_pages(heap)) #if GC_ENABLE_INCREMENTAL_MARK #define will_be_incremental_marking(objspace) ((objspace)->rgengc.need_major_gc != GPR_FLAG_NONE) #else @@ -3315,10 +3316,8 @@ gc_sweep_rest(rb_objspace_t *objspace) { rb_heap_t *heap = heap_eden; /* lazy sweep only for eden */ - if (is_lazy_sweeping(heap)) { - while (is_lazy_sweeping(heap)) { - gc_sweep_step(objspace, heap); - } + while (has_sweeping_pages(heap)) { + gc_sweep_step(objspace, heap); } } |