Skip to content

Instantly share code, notes, and snippets.

@authorNari
Created October 4, 2012 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save authorNari/3833763 to your computer and use it in GitHub Desktop.
Save authorNari/3833763 to your computer and use it in GitHub Desktop.
diff --git a/gc.c b/gc.c
index fbfcc3b..053f2af 100644
--- a/gc.c
+++ b/gc.c
@@ -585,6 +585,10 @@ static void
init_heap(rb_objspace_t *objspace)
{
add_heap_slots(objspace, HEAP_MIN_SLOTS / HEAP_OBJ_LIMIT);
+ objspace->profile.invoke_time = getrusage_time();
+ finalizer_table = st_init_numtable();
+ init_mark_stack(&objspace->mark_stack);
+
#ifdef USE_SIGALTSTACK
{
/* altstack of another threads are allocated in another place */
@@ -594,10 +598,6 @@ init_heap(rb_objspace_t *objspace)
free(tmp); /* free previously allocated area */
}
#endif
-
- objspace->profile.invoke_time = getrusage_time();
- finalizer_table = st_init_numtable();
- init_mark_stack(&objspace->mark_stack);
}
static void
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment