diff --git a/src/opt/mm_2buddy.h b/src/opt/mm_2buddy.h index ccd4b413..14c4e079 100644 --- a/src/opt/mm_2buddy.h +++ b/src/opt/mm_2buddy.h @@ -31,13 +31,8 @@ static void* mm_alloc(usz sz, u8 type) { assert(sz>=16); onAlloc(sz, type); u8 b1 = 64-__builtin_clzl(sz-1ull); - Value* r; - if (sz <= (3ull<<(b1-2))) r = b3_allocL(b1-2, type); - else r = b1_allocL(b1, type); - #ifdef OBJ_COUNTER - r->uid = currObjCounter++; - #endif - return r; + if (sz <= (3ull<<(b1-2))) return b3_allocL(b1-2, type); + else return b1_allocL(b1, type); } static void mm_free(Value* x) { if (x->mmInfo&64) b3_free(x); diff --git a/src/opt/mm_buddy.h b/src/opt/mm_buddy.h index f1bd5391..fe5d06db 100644 --- a/src/opt/mm_buddy.h +++ b/src/opt/mm_buddy.h @@ -23,9 +23,6 @@ static void* mm_alloc(usz sz, u8 type) { assert(sz>=16); onAlloc(sz, type); Value* r = mm_allocL(BSZI(sz), type); - #ifdef OBJ_COUNTER - r->uid = currObjCounter++; - #endif return r; } diff --git a/src/opt/mm_buddyTemplate.h b/src/opt/mm_buddyTemplate.h index 0e7cb59b..2646ae66 100644 --- a/src/opt/mm_buddyTemplate.h +++ b/src/opt/mm_buddyTemplate.h @@ -38,6 +38,9 @@ static void* BN(allocL)(i64 bucket, u8 type) { u64* e = p + BSZ(bucket)/8; while(suid = currObjCounter++; + #endif return x; } #undef buckets