diff options
author | Aaron Patterson <tenderlove@ruby-lang.org> | 2020-11-02 14:40:29 -0800 |
---|---|---|
committer | Aaron Patterson <tenderlove@ruby-lang.org> | 2020-11-02 14:42:48 -0800 |
commit | 67b2c21c327c96d80b8a0fe02a96d417e85293e8 (patch) | |
tree | c4ea1236016fc2b7e40582a69966d35c5f8c7289 /proc.c | |
parent | 79b242260bc0530503dde85eda8e79b1c2aa9a6e (diff) |
Add `GC.auto_compact= true/false` and `GC.auto_compact`
* `GC.auto_compact=`, `GC.auto_compact` can be used to control when
compaction runs. Setting `auto_compact=` to true will cause
compaction to occurr duing major collections. At the moment,
compaction adds significant overhead to major collections, so please
test first!
[Feature #17176]
Diffstat (limited to 'proc.c')
-rw-r--r-- | proc.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -67,7 +67,7 @@ block_mark(const struct rb_block *block) RUBY_MARK_MOVABLE_UNLESS_NULL(captured->self); RUBY_MARK_MOVABLE_UNLESS_NULL((VALUE)captured->code.val); if (captured->ep && captured->ep[VM_ENV_DATA_INDEX_ENV] != Qundef /* cfunc_proc_t */) { - RUBY_MARK_MOVABLE_UNLESS_NULL(VM_ENV_ENVVAL(captured->ep)); + rb_gc_mark(VM_ENV_ENVVAL(captured->ep)); } } break; @@ -90,9 +90,6 @@ block_compact(struct rb_block *block) struct rb_captured_block *captured = &block->as.captured; captured->self = rb_gc_location(captured->self); captured->code.val = rb_gc_location(captured->code.val); - if (captured->ep && captured->ep[VM_ENV_DATA_INDEX_ENV] != Qundef /* cfunc_proc_t */) { - UPDATE_REFERENCE(captured->ep[VM_ENV_DATA_INDEX_ENV]); - } } break; case block_type_symbol: |