diff options
author | Aaron Patterson <[email protected]> | 2019-07-10 11:12:28 -0500 |
---|---|---|
committer | Aaron Patterson <[email protected]> | 2019-07-10 11:12:28 -0500 |
commit | 12762b76cba8ac4623a6c16e1fe60efafa3b7d1c (patch) | |
tree | 317677a4c2774ad768e19dc6c66f2accf64bdd54 /gc.c | |
parent | f91879a7b548284c93743168acfd11e3d2aeefac (diff) |
Don't manipulate GC flags directly
We need to disable the GC around compaction (for now) because object id
book keeping can cause malloc to happen and that can trigger GC.
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -8217,9 +8217,9 @@ gc_compact(rb_objspace_t *objspace, int use_toward_empty, int use_double_pages, /* pin objects referenced by maybe pointers */ rb_gc(); /* compact */ - during_gc = TRUE; + rb_gc_disable(); gc_compact_after_gc(objspace, use_toward_empty, use_double_pages, TRUE); - during_gc = FALSE; + rb_gc_enable(); } objspace->flags.during_compacting = FALSE; return gc_compact_stats(objspace); |