fix GC_VISIT_V2 completely not respecting -M

This commit is contained in:
dzaima 2023-02-26 18:17:35 +02:00
parent 1c1da8fdfe
commit bcc19c11fd
2 changed files with 4 additions and 6 deletions

View File

@ -108,13 +108,12 @@ static bool isCmd(char* s, char** e, const char* cmd) {
")escaped ",
")profile ", ")profile@",
")t ", ")t:", ")time ", ")time:",
")mem ", ")mem t", ")mem s", ")mem f",
")mem", ")mem t", ")mem s", ")mem f",
")erase ",
")clearImportCache",
")kb",
")theme dark", ")theme light", ")theme none",
")exit",
")off",
")exit", ")off",
")vars",
")gc", ")gc off", ")gc on",
")internalPrint ",

View File

@ -52,16 +52,15 @@ static NOINLINE void* BN(allocateMore)(i64 bucket, u8 type, i64 from, i64 to) {
#if GC_VISIT_V2
if (!BN(allocMore_rec)) {
gc_forceGC();
alloc_rec:;
BN(allocMore_rec) = true;
alloc_rec:;
void* r = BN(allocL)(bucket, type);
BN(allocMore_rec) = false;
return r;
}
BN(allocMore_rec) = false;
#else
thrOOM();
#endif
thrOOM();
}
#if NO_MMAP