Skip to content
Permalink
Browse files
Disable GC during gc_each_objects(); fix #3616
  • Loading branch information
matz committed Apr 20, 2017
1 parent 62dae09 commit d2cad9ac5b8db89fc9d21f5795846f983236798c
Showing 1 changed file with 3 additions and 0 deletions.
@@ -1491,7 +1491,9 @@ static void
gc_each_objects(mrb_state *mrb, mrb_gc *gc, mrb_each_object_callback *callback, void *data)
{
mrb_heap_page* page = gc->heaps;
mrb_bool old_disable = gc->disabled;

gc->disabled = TRUE;
while (page != NULL) {
RVALUE *p, *pend;

@@ -1504,6 +1506,7 @@ gc_each_objects(mrb_state *mrb, mrb_gc *gc, mrb_each_object_callback *callback,

page = page->next;
}
gc->disabled = old_disable;
}

void

0 comments on commit d2cad9a

Please sign in to comment.