1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

mjit_worker.c: never trigger GC on MJIT worker

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64302 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
k0kubun 2018-08-11 14:27:53 +00:00
parent 004b8ad0c3
commit 1b157084a4

View file

@ -318,7 +318,7 @@ mjit_warning(const char *format, ...)
static struct rb_mjit_unit_node *
create_list_node(struct rb_mjit_unit *unit)
{
struct rb_mjit_unit_node *node = ZALLOC(struct rb_mjit_unit_node);
struct rb_mjit_unit_node *node = (struct rb_mjit_unit_node *)calloc(1, sizeof(struct rb_mjit_unit_node)); /* To prevent GC, don't use ZALLOC */
node->unit = unit;
return node;
}
@ -361,7 +361,7 @@ remove_from_list(struct rb_mjit_unit_node *node, struct rb_mjit_unit_list *list)
list->head = NULL;
}
list->length--;
xfree(node);
free(node);
}
static void
@ -419,7 +419,7 @@ free_unit(struct rb_mjit_unit *unit)
if (unit->handle) /* handle is NULL if it's in queue */
dlclose(unit->handle);
clean_object_files(unit);
xfree(unit);
free(unit);
}
/* Start a critical section. Use message MSG to print debug info at