summaryrefslogtreecommitdiff
path: root/mjit_worker.c
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-11 14:27:53 (GMT)
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-11 14:27:53 (GMT)
commit1b157084a4fa5d6190a22dff0bfc5c66b6b75a43 (patch)
tree3ad0e9d4a95df80ae852368fa3abcbaa0ad16ec9 /mjit_worker.c
parent004b8ad0c349070fdea552dcab0fb21c04dbc105 (diff)
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
Diffstat (limited to 'mjit_worker.c')
-rw-r--r--mjit_worker.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mjit_worker.c b/mjit_worker.c
index ff666c8..c37bec8 100644
--- a/mjit_worker.c
+++ b/mjit_worker.c
@@ -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