mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Fully-disable fixed-size heaps for now
This commit is contained in:
parent
d7fa754d1f
commit
50eb431225
2 changed files with 11 additions and 8 deletions
7
gc.c
7
gc.c
|
@ -1374,8 +1374,11 @@ void *gc_alloc(gc_heap_root * hrt, size_t size, char *obj, gc_thread_data * thd,
|
|||
#if INTPTR_MAX == INT64_MAX
|
||||
} else if (size <= 96) {
|
||||
heap_type = HEAP_96;
|
||||
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;
|
||||
#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