Integrated MID v3.5 into active code path, making it available for C5/C6/C7 routing. Key Changes: - Policy Box: Added SMALL_ROUTE_MID_V35 with ENV gates (HAKMEM_MID_V35_ENABLED, HAKMEM_MID_V35_CLASSES) - HotBox: Implemented small_mid_v35_alloc/free with TLS-cached page allocation - Front Gate: Wired MID_V35 routing into malloc_tiny_fast.h (priority: ULTRA > MID_V35 > V7) - Build: Added core/smallobject_mid_v35.o to all object lists Architecture: - Slot sizes: C5=384B, C6=512B, C7=1024B - Page size: 64KB (170/128/64 slots) - Integration: ColdIface v2 (refill/retire), Stats v2 (observation), Learner v2 (dormant) Status: Build successful, ready for A/B benchmarking Next: Performance validation (C6-heavy, C5+C6-only, Mixed benchmarks) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
48 lines
1.2 KiB
C
48 lines
1.2 KiB
C
// smallobject_mid_v35_box.h
|
|
// Phase v11a-3: MID v3.5 Public API (L1 HotBox)
|
|
//
|
|
// Purpose:
|
|
// - Fast-path alloc/free for C5/C6/C7 (257-1024B range)
|
|
// - Uses Segment v2 + ColdIface v2 + Stats v2 + Learner v2
|
|
// - TLS-cached page allocation with refill/retire via ColdIface
|
|
|
|
#ifndef SMALLOBJECT_MID_V35_BOX_H
|
|
#define SMALLOBJECT_MID_V35_BOX_H
|
|
|
|
#include <stdint.h>
|
|
#include <stddef.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
// ============================================================================
|
|
// MID v3.5 Public API (called from malloc_tiny_fast.h)
|
|
// ============================================================================
|
|
|
|
/**
|
|
* Allocate from MID v3.5 path
|
|
* @param class_idx: Size class (C5/C6/C7 only)
|
|
* @param size: Requested size (for validation/debugging)
|
|
* @return USER pointer or NULL on failure
|
|
*/
|
|
void* small_mid_v35_alloc(uint32_t class_idx, size_t size);
|
|
|
|
/**
|
|
* Free to MID v3.5 path
|
|
* @param ptr: USER pointer to free
|
|
* @param class_idx: Size class (C5/C6/C7 only)
|
|
*/
|
|
void small_mid_v35_free(void *ptr, uint32_t class_idx);
|
|
|
|
/**
|
|
* Initialize MID v3.5 (called from hakmem init)
|
|
*/
|
|
void small_mid_v35_init(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // SMALLOBJECT_MID_V35_BOX_H
|