Temporarily revert gc_alloc code to stabilize

The code crashes even with these changes reverted, so something else is clearly wrong.
This commit is contained in:
Justin Ethier 2018-07-16 18:58:04 -04:00
parent c89a434bf9
commit d7fa754d1f

14
gc.c
View file

@ -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