Files
hakmem/core/box/free_local_box.h
Moe Charm (CI) 0bc33dc4f5 Phase 9-2: Remove Legacy Backend & Unify to Shared Pool (50M ops/s)
- Removed Legacy Backend fallback; Shared Pool is now the sole backend.
- Removed Soft Cap limit in Shared Pool to allow full memory management.
- Implemented EMPTY slab recycling with batched meta->used decrement in remote drain.
- Updated tiny_free_local_box to return is_empty status for safe recycling.
- Fixed race condition in release path by removing from legacy list early.
- Achieved 50.3M ops/s in WS8192 benchmark (+200% vs baseline).
2025-12-01 13:47:23 +09:00

10 lines
413 B
C

// free_local_box.h - Box: Same-thread free to freelist (first-free publishes)
#pragma once
#include <stdint.h>
#include "hakmem_tiny_superslab.h"
// Perform same-thread freelist push. On first-free (prev==NULL), publishes via Ready/Mailbox.
// Returns: 1 if slab transitioned to EMPTY (used=0), 0 otherwise.
int tiny_free_local_box(SuperSlab* ss, int slab_idx, TinySlabMeta* meta, void* ptr, uint32_t my_tid);