mirror of
https://github.com/ProgramSnail/Lama.git
synced 2025-12-06 06:48:48 +00:00
Fix constants in gc.h
This commit is contained in:
parent
df6fc6bcab
commit
4bfbd991e7
1 changed files with 2 additions and 9 deletions
11
runtime/gc.h
11
runtime/gc.h
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue