28 lines
887 B
C
28 lines
887 B
C
|
|
// Box: Slab Management (Bitmap Operations)
|
||
|
|
// Purpose: Slab bitmap manipulation within SuperSlab
|
||
|
|
//
|
||
|
|
// Responsibilities:
|
||
|
|
// - Activate slab in bitmap (mark as in-use)
|
||
|
|
// - Deactivate slab in bitmap (mark as free)
|
||
|
|
// - Find first free slab using bitmap (ctz-based search)
|
||
|
|
//
|
||
|
|
// Dependencies:
|
||
|
|
// - hakmem_tiny_superslab.h (for SuperSlab, ss_slabs_capacity)
|
||
|
|
//
|
||
|
|
// API:
|
||
|
|
// - superslab_activate_slab() - mark slab active in bitmap
|
||
|
|
// - superslab_deactivate_slab() - mark slab inactive
|
||
|
|
// - superslab_find_free_slab() - find first free slab (ctz)
|
||
|
|
|
||
|
|
#ifndef SS_SLAB_MANAGEMENT_BOX_H
|
||
|
|
#define SS_SLAB_MANAGEMENT_BOX_H
|
||
|
|
|
||
|
|
#include "hakmem_tiny_superslab.h"
|
||
|
|
|
||
|
|
// Slab bitmap management
|
||
|
|
void superslab_activate_slab(SuperSlab* ss, int slab_idx);
|
||
|
|
void superslab_deactivate_slab(SuperSlab* ss, int slab_idx);
|
||
|
|
int superslab_find_free_slab(SuperSlab* ss);
|
||
|
|
|
||
|
|
#endif // SS_SLAB_MANAGEMENT_BOX_H
|