This commit is contained in:
dzaima 2021-05-25 02:20:32 +03:00
parent f1f4e417e1
commit 55a93d1838
4 changed files with 4 additions and 8 deletions

View File

@ -21,7 +21,7 @@
#define SFNS_FILLS true // whether to insert fills for structural functions (∾, ≍, etc)
#define FAKE_RUNTIME false // whether to disable the self-hosted runtime
#define MM 1 // memory manager; 0 - malloc (no GC); 1 - buddy; 2 - 2buddy
#define HEAP_MAX 1ULL<<48 // default heap max size
#define HEAP_MAX ~0ULL // default heap max size
// #define LOG_GC // log GC stats
// #define FORMATTER // use self-hosted formatter for output

View File

@ -2,6 +2,9 @@
#include "vm.h"
#include "utils/file.h"
u64 mm_heapMax = HEAP_MAX;
u64 mm_heapAlloc;
#define FA(N,X) B bi_##N; B N##_c1(B t, B x); B N##_c2(B t, B w, B x);
#define FM(N,X) B bi_##N; B N##_c1(B t, B x);
#define FD(N,X) B bi_##N; B N##_c2(B t, B w, B x);
@ -241,7 +244,6 @@ static B def_m2_d(B m, B f, B g) { thrM("cannot derive this"); }
static B def_slice(B x, usz s) { thrM("cannot slice non-array!"); }
static inline void base_init() { // very first init function
mm_heapMax = HEAP_MAX;
for (i32 i = 0; i < t_COUNT; i++) {
ti[i].free = def_free;
ti[i].visit = def_visit;

View File

@ -4,9 +4,6 @@
u64 currObjCounter;
#endif
u64 mm_heapAlloc;
u64 mm_heapMax;
EmptyValue* b1_buckets[64];
b1_AllocInfo* b1_al;
u64 b1_alCap;

View File

@ -4,9 +4,6 @@
u64 currObjCounter;
#endif
u64 mm_heapAlloc;
u64 mm_heapMax;
EmptyValue* buckets[64];
mm_AllocInfo* mm_al;
u64 mm_alCap;