void * cr8r_sla_alloc(cr8r_sla *self)
Allocate an object.
void cr8r_sla_free(cr8r_sla *self, void *p)
Frees and object which was previously allocated by cr8r_sla_alloc.
void cr8r_sla_delete(cr8r_sla *self)
Delete a slab allocator.
bool cr8r_sla_init(cr8r_sla *self, uint64_t elem_size, uint64_t cap)
Initialize a slab allocator.
uint64_t slabs_len
Number of slabs.
uint64_t elem_size
Size of a single element.
uint64_t slab_cap
Capacity of last slab.
void ** slabs
Array of pointers to "slabs" (elements buffers).
void * first_elem
Pointer to first unallocated element.