mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Temporarily re-enabling
This commit is contained in:
parent
50eb431225
commit
67c50608f0
2 changed files with 18 additions and 18 deletions
24
gc.c
24
gc.c
|
@ -1357,28 +1357,28 @@ 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;
|
||||
try_alloc_slow = &gc_try_alloc_slow;
|
||||
//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;
|
||||
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;
|
||||
try_alloc_slow = &gc_try_alloc_slow;
|
||||
//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;
|
||||
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
|
||||
} else if (size <= 96) {
|
||||
heap_type = HEAP_96;
|
||||
try_alloc = &gc_try_alloc;
|
||||
try_alloc_slow = &gc_try_alloc_slow;
|
||||
//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;
|
||||
try_alloc = &gc_try_alloc_fixed_size;
|
||||
try_alloc_slow = &gc_try_alloc_slow_fixed_size;
|
||||
#endif
|
||||
} else if (size >= MAX_STACK_OBJ) {
|
||||
heap_type = HEAP_HUGE;
|
||||
|
|
|
@ -172,12 +172,12 @@ typedef enum {
|
|||
|
||||
/** The first heap type that is not fixed-size */
|
||||
// TODO: disable this for now
|
||||
#define LAST_FIXED_SIZE_HEAP_TYPE -1
|
||||
//#if INTPTR_MAX == INT64_MAX
|
||||
//#define LAST_FIXED_SIZE_HEAP_TYPE HEAP_96
|
||||
//#else
|
||||
//#define LAST_FIXED_SIZE_HEAP_TYPE HEAP_64
|
||||
//#endif
|
||||
//#define LAST_FIXED_SIZE_HEAP_TYPE -1
|
||||
#if INTPTR_MAX == INT64_MAX
|
||||
#define LAST_FIXED_SIZE_HEAP_TYPE HEAP_96
|
||||
#else
|
||||
#define LAST_FIXED_SIZE_HEAP_TYPE HEAP_64
|
||||
#endif
|
||||
|
||||
/** The number of `gc_heap_type`'s */
|
||||
#define NUM_HEAP_TYPES (HEAP_HUGE + 1)
|
||||
|
|
Loading…
Add table
Reference in a new issue