2025-11-20 07:32:30 +09:00
|
|
|
|
// Box: Core Allocation
|
2025-12-04 14:22:48 +09:00
|
|
|
|
// Purpose: SuperSlab allocation/deallocation(割り当ての出入口 Box)
|
2025-11-20 07:32:30 +09:00
|
|
|
|
//
|
|
|
|
|
|
// Responsibilities:
|
|
|
|
|
|
// - Allocate SuperSlab with ACE-aware sizing
|
|
|
|
|
|
// - Free SuperSlab with LRU cache integration
|
2025-12-04 14:22:48 +09:00
|
|
|
|
// - Defer slab‑level details to Slab Management Box
|
2025-11-20 07:32:30 +09:00
|
|
|
|
//
|
|
|
|
|
|
// Dependencies:
|
|
|
|
|
|
// - ss_os_acquire_box (OS-level mmap/munmap)
|
|
|
|
|
|
// - ss_cache_box (LRU cache + prewarm)
|
|
|
|
|
|
// - ss_stats_box (statistics)
|
|
|
|
|
|
// - ss_ace_box (ACE-aware size selection)
|
|
|
|
|
|
// - ss_slab_management_box (bitmap operations)
|
|
|
|
|
|
// - hakmem_super_registry (registry integration)
|
|
|
|
|
|
//
|
|
|
|
|
|
// API:
|
|
|
|
|
|
// - superslab_allocate() - main allocation entry
|
|
|
|
|
|
// - superslab_free() - deallocation with LRU cache
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef SS_ALLOCATION_BOX_H
|
|
|
|
|
|
#define SS_ALLOCATION_BOX_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "hakmem_tiny_superslab.h"
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
|
|
|
|
// SuperSlab allocation (ACE-aware)
|
|
|
|
|
|
SuperSlab* superslab_allocate(uint8_t size_class);
|
|
|
|
|
|
|
|
|
|
|
|
// SuperSlab deallocation (LRU cache integration)
|
|
|
|
|
|
void superslab_free(SuperSlab* ss);
|
|
|
|
|
|
|
|
|
|
|
|
#endif // SS_ALLOCATION_BOX_H
|