Fix C7 warm/TLS Release path and unify debug instrumentation
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
// Phase E1-CORRECT: Box API for next pointer operations
|
||||
#include "box/tiny_next_ptr_box.h"
|
||||
#include "front/tiny_heap_v2.h"
|
||||
#include "box/c7_meta_used_counter_box.h"
|
||||
|
||||
// Debug counters (thread-local)
|
||||
static __thread uint64_t g_3layer_bump_hits = 0;
|
||||
@ -265,6 +266,7 @@ static void* tiny_alloc_slow_new(int class_idx) {
|
||||
meta->freelist = tiny_next_read(node); // Phase E1-CORRECT: Box API
|
||||
items[got++] = node;
|
||||
meta->used++;
|
||||
c7_meta_used_note(class_idx, C7_META_USED_SRC_FRONT);
|
||||
}
|
||||
|
||||
// Then linear carve (KEY OPTIMIZATION - direct array fill!)
|
||||
@ -285,6 +287,11 @@ static void* tiny_alloc_slow_new(int class_idx) {
|
||||
}
|
||||
|
||||
meta->used += need; // Reserve to TLS; not active until returned to user
|
||||
if (class_idx == 7) {
|
||||
for (uint32_t i = 0; i < need; ++i) {
|
||||
c7_meta_used_note(class_idx, C7_META_USED_SRC_FRONT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (got == 0) {
|
||||
|
||||
Reference in New Issue
Block a user