Slab allocator
include/mem/slab.h View source View on GitHubStructs
Section titled “Structs”slab_elcm_candidate
Section titled “slab_elcm_candidate” struct slab_elcm_candidate (3 fields) source
slab_size_constant
Section titled “slab_size_constant” struct slab_size_constant (5 fields) source
Functions
Section titled “Functions”slab_allocator_init
Section titled “slab_allocator_init”void slab_allocator_init(void) source slab_domain_init
Section titled “slab_domain_init”void slab_domain_init(void) source slab_domains_print
Section titled “slab_domains_print”void slab_domains_print(void) source slab_domain_init_late
Section titled “slab_domain_init_late”void slab_domain_init_late(void) source slab_domain_busy
Section titled “slab_domain_busy”bool slab_domain_busy(struct slab_domain *domain) source Macros
Section titled “Macros”SLAB_SIZE_REGISTER
Section titled “SLAB_SIZE_REGISTER”#define SLAB_SIZE_REGISTER(n, s, a) source Expansion
#define SLAB_SIZE_REGISTER(n, s, a) \
LINKER_SECTION_OBJECT(struct slab_size_constant, slab_sizes) \
slab_size_constant_##n = { \
.name = #n, \
.size = s, \
.align = a, \
.list = LIST_NODE_INIT(slab_size_constant_##n.list), \
.internal = {{0}}, \
} SLAB_SIZE_REGISTER_FOR_STRUCT
Section titled “SLAB_SIZE_REGISTER_FOR_STRUCT”#define SLAB_SIZE_REGISTER_FOR_STRUCT(sname, al) source convenience wrapper
Expansion
#define SLAB_SIZE_REGISTER_FOR_STRUCT(sname, al) \
SLAB_SIZE_REGISTER(sname, sizeof(struct sname), al) SLAB_OBJ_ALIGN_DEFAULT
Section titled “SLAB_OBJ_ALIGN_DEFAULT”#define SLAB_OBJ_ALIGN_DEFAULT 8u source SLAB_FREE_POISON_BYTE
Section titled “SLAB_FREE_POISON_BYTE”#define SLAB_FREE_POISON_BYTE 0x67 source SLAB_ALLOC_NONZERO_POISON_BYTE
Section titled “SLAB_ALLOC_NONZERO_POISON_BYTE”#define SLAB_ALLOC_NONZERO_POISON_BYTE 0x42 source