ruby-changes:52094
From: k0kubun <ko1@a...>
Date: Sat, 11 Aug 2018 23:27:58 +0900 (JST)
Subject: [ruby-changes:52094] k0kubun:r64302 (trunk): mjit_worker.c: never trigger GC on MJIT worker
k0kubun 2018-08-11 23:27:53 +0900 (Sat, 11 Aug 2018) New Revision: 64302 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=64302 Log: mjit_worker.c: never trigger GC on MJIT worker Modified files: trunk/mjit_worker.c Index: mjit_worker.c =================================================================== --- mjit_worker.c (revision 64301) +++ mjit_worker.c (revision 64302) @@ -318,7 +318,7 @@ mjit_warning(const char *format, ...) https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L318 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_nod https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L361 list->head = NULL; } list->length--; - xfree(node); + free(node); } static void @@ -419,7 +419,7 @@ free_unit(struct rb_mjit_unit *unit) https://github.com/ruby/ruby/blob/trunk/mjit_worker.c#L419 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/