Fix constants in gc.h

This commit is contained in:
Roman Venediktov 2024-07-11 13:12:04 +02:00
parent df6fc6bcab
commit 4bfbd991e7

View file

@ -37,14 +37,7 @@
#define SET_FORWARD_ADDRESS(x, addr) (x = ((x & 3) | ((ptrt)(addr)))) #define SET_FORWARD_ADDRESS(x, addr) (x = ((x & 3) | ((ptrt)(addr))))
// if heap is full after gc shows in how many times it has to be extended // if heap is full after gc shows in how many times it has to be extended
#define EXTRA_ROOM_HEAP_COEFFICIENT 2 #define EXTRA_ROOM_HEAP_COEFFICIENT 2
// #ifdef DEBUG_VERSION #define MINIMUM_HEAP_CAPACITY (64)
// # define MINIMUM_HEAP_CAPACITY (8)
// #else
// # define MINIMUM_HEAP_CAPACITY (1 << 2)
//#define MINIMUM_HEAP_CAPACITY (1 << 30)
//#define MINIMUM_HEAP_CAPACITY (30)
#define MINIMUM_HEAP_CAPACITY (100)
// #endif
#include <stdbool.h> #include <stdbool.h>
#include <stddef.h> #include <stddef.h>
@ -102,7 +95,7 @@ void physically_relocate (memory_chunk *);
// an auxiliary data structure called `extra_roots_pool`. // an auxiliary data structure called `extra_roots_pool`.
// extra_roots_pool is a simple LIFO stack. During `pop` it compares that pop's // extra_roots_pool is a simple LIFO stack. During `pop` it compares that pop's
// argument is equal to the current stack top. // argument is equal to the current stack top.
#define MAX_EXTRA_ROOTS_NUMBER 4096 #define MAX_EXTRA_ROOTS_NUMBER 32
typedef struct { typedef struct {
int current_free; int current_free;