mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-24 04:25:06 +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);
|
size = gc_heap_align(size);
|
||||||
if (size <= 32) {
|
if (size <= 32) {
|
||||||
heap_type = HEAP_SM;
|
heap_type = HEAP_SM;
|
||||||
try_alloc = &gc_try_alloc;
|
//try_alloc = &gc_try_alloc;
|
||||||
try_alloc_slow = &gc_try_alloc_slow;
|
//try_alloc_slow = &gc_try_alloc_slow;
|
||||||
// TODO:
|
// TODO:
|
||||||
//try_alloc = &gc_try_alloc_fixed_size;
|
try_alloc = &gc_try_alloc_fixed_size;
|
||||||
//try_alloc_slow = &gc_try_alloc_slow_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;
|
//try_alloc = &gc_try_alloc;
|
||||||
try_alloc_slow = &gc_try_alloc_slow;
|
//try_alloc_slow = &gc_try_alloc_slow;
|
||||||
// TODO:
|
// TODO:
|
||||||
//try_alloc = &gc_try_alloc_fixed_size;
|
try_alloc = &gc_try_alloc_fixed_size;
|
||||||
//try_alloc_slow = &gc_try_alloc_slow_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
|
||||||
} else if (size <= 96) {
|
} else if (size <= 96) {
|
||||||
heap_type = HEAP_96;
|
heap_type = HEAP_96;
|
||||||
try_alloc = &gc_try_alloc;
|
//try_alloc = &gc_try_alloc;
|
||||||
try_alloc_slow = &gc_try_alloc_slow;
|
//try_alloc_slow = &gc_try_alloc_slow;
|
||||||
// TODO:
|
// TODO:
|
||||||
//try_alloc = &gc_try_alloc_fixed_size;
|
try_alloc = &gc_try_alloc_fixed_size;
|
||||||
//try_alloc_slow = &gc_try_alloc_slow_fixed_size;
|
try_alloc_slow = &gc_try_alloc_slow_fixed_size;
|
||||||
#endif
|
#endif
|
||||||
} else if (size >= MAX_STACK_OBJ) {
|
} else if (size >= MAX_STACK_OBJ) {
|
||||||
heap_type = HEAP_HUGE;
|
heap_type = HEAP_HUGE;
|
||||||
|
|
|
@ -172,12 +172,12 @@ typedef enum {
|
||||||
|
|
||||||
/** The first heap type that is not fixed-size */
|
/** The first heap type that is not fixed-size */
|
||||||
// TODO: disable this for now
|
// TODO: disable this for now
|
||||||
#define LAST_FIXED_SIZE_HEAP_TYPE -1
|
//#define LAST_FIXED_SIZE_HEAP_TYPE -1
|
||||||
//#if INTPTR_MAX == INT64_MAX
|
#if INTPTR_MAX == INT64_MAX
|
||||||
//#define LAST_FIXED_SIZE_HEAP_TYPE HEAP_96
|
#define LAST_FIXED_SIZE_HEAP_TYPE HEAP_96
|
||||||
//#else
|
#else
|
||||||
//#define LAST_FIXED_SIZE_HEAP_TYPE HEAP_64
|
#define LAST_FIXED_SIZE_HEAP_TYPE HEAP_64
|
||||||
//#endif
|
#endif
|
||||||
|
|
||||||
/** The number of `gc_heap_type`'s */
|
/** The number of `gc_heap_type`'s */
|
||||||
#define NUM_HEAP_TYPES (HEAP_HUGE + 1)
|
#define NUM_HEAP_TYPES (HEAP_HUGE + 1)
|
||||||
|
|
Loading…
Add table
Reference in a new issue