mirror of
https://github.com/justinethier/cyclone.git
synced 2025-07-15 16:57:35 +02:00
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:
parent
c89a434bf9
commit
d7fa754d1f
1 changed files with 10 additions and 4 deletions
14
gc.c
14
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);
|
size = gc_heap_align(size);
|
||||||
if (size <= 32) {
|
if (size <= 32) {
|
||||||
heap_type = HEAP_SM;
|
heap_type = HEAP_SM;
|
||||||
try_alloc = &gc_try_alloc_fixed_size;
|
try_alloc = &gc_try_alloc;
|
||||||
try_alloc_slow = &gc_try_alloc_slow_fixed_size;
|
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) {
|
} else if (size <= 64) {
|
||||||
heap_type = HEAP_64;
|
heap_type = HEAP_64;
|
||||||
try_alloc = &gc_try_alloc_fixed_size;
|
try_alloc = &gc_try_alloc;
|
||||||
try_alloc_slow = &gc_try_alloc_slow_fixed_size;
|
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
|
// Only use this heap on 64-bit platforms, where larger objs are used more often
|
||||||
// Code from http://stackoverflow.com/a/32717129/101258
|
// Code from http://stackoverflow.com/a/32717129/101258
|
||||||
#if INTPTR_MAX == INT64_MAX
|
#if INTPTR_MAX == INT64_MAX
|
||||||
|
|
Loading…
Add table
Reference in a new issue