// unified_batch_box.h - Box U2: Batch Alloc Connector for Unified Cache // // Purpose: Provide batch allocation API for Unified Frontend Cache (Box U1) // Design: Thin wrapper over existing Box flow (Carve/Push Box C1) // // API: // int superslab_batch_alloc(int class_idx, void** blocks, int max_count) // - Allocates up to max_count blocks from SuperSlab // - Returns actual count allocated // - blocks[] receives BASE pointers (caller converts to USER) // // Box Theory: // - Box U2 (this) = Connector layer (no state, pure function) // - Box U1 (Unified Cache) calls this for batch refill // - This delegates to Box C1 (Carve/Push) for actual allocation // // ENV: None (controlled by caller Box U1) #ifndef HAK_BOX_UNIFIED_BATCH_BOX_H #define HAK_BOX_UNIFIED_BATCH_BOX_H #include // Batch allocate blocks from SuperSlab (for Unified Cache refill) // Returns: Actual count allocated (0 = failed) // Note: blocks[] contains BASE pointers (not USER pointers) int superslab_batch_alloc(int class_idx, void** blocks, int max_count); #endif // HAK_BOX_UNIFIED_BATCH_BOX_H