fix -M
This commit is contained in:
parent
f1f4e417e1
commit
55a93d1838
2
src/h.h
2
src/h.h
@ -21,7 +21,7 @@
|
|||||||
#define SFNS_FILLS true // whether to insert fills for structural functions (∾, ≍, etc)
|
#define SFNS_FILLS true // whether to insert fills for structural functions (∾, ≍, etc)
|
||||||
#define FAKE_RUNTIME false // whether to disable the self-hosted runtime
|
#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 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 LOG_GC // log GC stats
|
||||||
// #define FORMATTER // use self-hosted formatter for output
|
// #define FORMATTER // use self-hosted formatter for output
|
||||||
|
|||||||
@ -2,6 +2,9 @@
|
|||||||
#include "vm.h"
|
#include "vm.h"
|
||||||
#include "utils/file.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 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 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);
|
#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 B def_slice(B x, usz s) { thrM("cannot slice non-array!"); }
|
||||||
|
|
||||||
static inline void base_init() { // very first init function
|
static inline void base_init() { // very first init function
|
||||||
mm_heapMax = HEAP_MAX;
|
|
||||||
for (i32 i = 0; i < t_COUNT; i++) {
|
for (i32 i = 0; i < t_COUNT; i++) {
|
||||||
ti[i].free = def_free;
|
ti[i].free = def_free;
|
||||||
ti[i].visit = def_visit;
|
ti[i].visit = def_visit;
|
||||||
|
|||||||
@ -4,9 +4,6 @@
|
|||||||
u64 currObjCounter;
|
u64 currObjCounter;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
u64 mm_heapAlloc;
|
|
||||||
u64 mm_heapMax;
|
|
||||||
|
|
||||||
EmptyValue* b1_buckets[64];
|
EmptyValue* b1_buckets[64];
|
||||||
b1_AllocInfo* b1_al;
|
b1_AllocInfo* b1_al;
|
||||||
u64 b1_alCap;
|
u64 b1_alCap;
|
||||||
|
|||||||
@ -4,9 +4,6 @@
|
|||||||
u64 currObjCounter;
|
u64 currObjCounter;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
u64 mm_heapAlloc;
|
|
||||||
u64 mm_heapMax;
|
|
||||||
|
|
||||||
EmptyValue* buckets[64];
|
EmptyValue* buckets[64];
|
||||||
mm_AllocInfo* mm_al;
|
mm_AllocInfo* mm_al;
|
||||||
u64 mm_alCap;
|
u64 mm_alCap;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user