diff --git a/src/core/stuff.h b/src/core/stuff.h index 991126a1..5a0803be 100644 --- a/src/core/stuff.h +++ b/src/core/stuff.h @@ -416,7 +416,7 @@ FORCE_INLINE void preAlloc(usz sz, u8 type) { #endif } #if VERIFY_TAIL -void tailVerifyAlloc(void* ptr, u64 origSz, i64 logAlloc, u8 type); +void tailVerifyAlloc(void* ptr, u64 origSz, ux logAlloc, u8 type); void tailVerifyFree(void* ptr); void tailVerifyReinit(void* ptr, u64 s, u64 e); #define FINISH_OVERALLOC(P, S, E) tailVerifyReinit(P, S, E) diff --git a/src/opt/gc.c b/src/opt/gc.c index 3f7c0665..e7121a1b 100644 --- a/src/opt/gc.c +++ b/src/opt/gc.c @@ -215,7 +215,7 @@ void gc_forceGC(bool toplevel) { } STATIC_GLOBAL bool gc_wantTopLevelGC; -bool gc_maybeGC(bool toplevel) { +NOINLINE bool gc_maybeGC(bool toplevel) { if (gc_depth) return false; u64 used = tot_heapUsed(); if (used > gc_lastAlloc*2 || (toplevel && gc_wantTopLevelGC)) { diff --git a/src/opt/mm_2buddy.c b/src/opt/mm_2buddy.c index 2181826e..816c2441 100644 --- a/src/opt/mm_2buddy.c +++ b/src/opt/mm_2buddy.c @@ -39,7 +39,7 @@ GLOBAL EmptyValue* mm_buckets[128]; #undef BSZ #undef ALLOC_MODE -NOINLINE void* mm_allocS(i64 bucket, u8 type) { +NOINLINE void* mm_allocS(ux bucket, u8 type) { return bucket&64? b3_allocS(bucket, type) : b1_allocS(bucket, type); } diff --git a/src/opt/mm_buddy.c b/src/opt/mm_buddy.c index aa3cb63a..4c218142 100644 --- a/src/opt/mm_buddy.c +++ b/src/opt/mm_buddy.c @@ -52,7 +52,7 @@ static void tailVerifyInit(void* ptr, u64 filled, u64 end, u64 allocEnd) { ITER_TAIL(F) #undef F } -void tailVerifyAlloc(void* ptr, u64 filled, i64 logAlloc, u8 type) { +void tailVerifyAlloc(void* ptr, u64 filled, ux logAlloc, u8 type) { u64 end = 1ULL<mmInfo = MMI(to); PLAINLOOP while (from != to) { from--; @@ -33,7 +33,7 @@ FORCE_INLINE void BN(splitTo)(EmptyValue* c, i64 from, i64 to, bool notEqual) { STATIC_GLOBAL bool BN(allocMore_rec); #endif -static NOINLINE void* BN(allocateMore)(i64 bucket, u8 type, i64 from, i64 to) { +static NOINLINE void* BN(allocateMore)(ux bucket, u8 type, ux from, ux to) { if (from >= ALSZ) from = ALSZ; if (from < (bucket&63)) from = bucket&63; u64 sz = BSZ(from); @@ -96,9 +96,9 @@ static NOINLINE void* BN(allocateMore)(i64 bucket, u8 type, i64 from, i64 to) { return BN(allocL)(bucket, type); } -NOINLINE void* BN(allocS)(i64 bucket, u8 type) { - i64 to = bucket&63; - i64 from = to; +NOINLINE void* BN(allocS)(ux bucket, u8 type) { + ux to = bucket&63; + ux from = to; EmptyValue* c; while (true) { if (from >= 63) return BN(allocateMore)(bucket, type, from, to); diff --git a/src/opt/mm_buddyTemplate.h b/src/opt/mm_buddyTemplate.h index 2cb2383a..a24b2019 100644 --- a/src/opt/mm_buddyTemplate.h +++ b/src/opt/mm_buddyTemplate.h @@ -26,8 +26,8 @@ ALLOC_FN void BN(free)(Value* x) { BN(freeLink)(x, true); } -NOINLINE void* BN(allocS)(i64 bucket, u8 type); -static void* BN(allocL)(i64 bucket, u8 type) { +NOINLINE void* BN(allocS)(ux bucket, u8 type); +static void* BN(allocL)(ux bucket, u8 type) { EmptyValue* x = buckets[bucket]; if (RARE(x==NULL)) return BN(allocS)(bucket, type); buckets[bucket] = vg_def_v(x->next);