Boxify superslab registry, add bench profile, and document C7 hotpath experiments
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
// Cold/maintenance path - not performance critical.
|
||||
#include "tiny_tls_guard.h"
|
||||
#include "box/ss_slab_meta_box.h" // Phase 3d-A: SlabMeta Box boundary
|
||||
#include "hakmem_super_registry.h"
|
||||
|
||||
// Phase 12: Helper to derive a representative class index for a SuperSlab
|
||||
// from per-slab metadata (all slabs are empty when used in trim).
|
||||
@ -96,8 +97,11 @@ void hak_tiny_trim(void) {
|
||||
}
|
||||
|
||||
// Walk the registry and collect empty SuperSlabs by class
|
||||
for (int i = 0; i < SUPER_REG_SIZE; i++) {
|
||||
SuperRegEntry* e = &g_super_reg[i];
|
||||
SuperRegEntry* reg = super_reg_entries();
|
||||
int reg_cap = super_reg_effective_size();
|
||||
if (!reg || reg_cap <= 0) return;
|
||||
for (int i = 0; i < reg_cap; i++) {
|
||||
SuperRegEntry* e = ®[i];
|
||||
uintptr_t base = atomic_load_explicit((_Atomic uintptr_t*)&e->base, memory_order_acquire);
|
||||
if (base == 0) continue;
|
||||
SuperSlab* ss = e->ss;
|
||||
|
||||
Reference in New Issue
Block a user