From d7fa754d1f24c9fe5df8ef6fbf22a5e13fdc0af3 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Mon, 16 Jul 2018 18:58:04 -0400 Subject: [PATCH] Temporarily revert gc_alloc code to stabilize The code crashes even with these changes reverted, so something else is clearly wrong. --- gc.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gc.c b/gc.c index 35980aff..d2085da4 100644 --- a/gc.c +++ b/gc.c @@ -1357,12 +1357,18 @@ void *gc_alloc(gc_heap_root * hrt, size_t size, char *obj, gc_thread_data * thd, size = gc_heap_align(size); if (size <= 32) { heap_type = HEAP_SM; - try_alloc = &gc_try_alloc_fixed_size; - try_alloc_slow = &gc_try_alloc_slow_fixed_size; + try_alloc = &gc_try_alloc; + try_alloc_slow = &gc_try_alloc_slow; + // TODO: + //try_alloc = &gc_try_alloc_fixed_size; + //try_alloc_slow = &gc_try_alloc_slow_fixed_size; } else if (size <= 64) { heap_type = HEAP_64; - try_alloc = &gc_try_alloc_fixed_size; - try_alloc_slow = &gc_try_alloc_slow_fixed_size; + try_alloc = &gc_try_alloc; + try_alloc_slow = &gc_try_alloc_slow; + // TODO: + //try_alloc = &gc_try_alloc_fixed_size; + //try_alloc_slow = &gc_try_alloc_slow_fixed_size; // Only use this heap on 64-bit platforms, where larger objs are used more often // Code from http://stackoverflow.com/a/32717129/101258 #if INTPTR_MAX == INT64_MAX