Skip to content

Slab allocator

struct slab_size_constant {
char *name;
size_t size;
size_t align;
struct list_head list;
struct list_head sort_list;
};

struct slab_size_constant referenced types:

#define SLAB_SIZE_REGISTER(n, s, a) \ static struct slab_size_constant slab_size_constant_##n \ __attribute__((section(".kernel_slab_sizes"), used)) = { \ .name = #n, \ .size = s, \ .align = a, \ .list = LIST_HEAD_INIT(slab_size_constant_##n.list), \ .sort_list = LIST_HEAD_INIT(slab_size_constant_##n.sort_list), \ }
#define SLAB_SIZE_REGISTER_FOR_STRUCT(sname, al) \ SLAB_SIZE_REGISTER(sname, sizeof(struct sname), al)
#define SLAB_OBJ_ALIGN_DEFAULT 16u