// 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 #include #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