MCPcopy Create free account
hub / github.com/codr7/hacktical-c / hc_slab_alloc_init

Function hc_slab_alloc_init

malloc2/malloc2.c:127–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127struct hc_slab_alloc *hc_slab_alloc_init(struct hc_slab_alloc *a,
128 struct hc_malloc *source,
129 const size_t slab_size) {
130 a->malloc.acquire = slab_acquire;
131 a->malloc.release = slab_release;
132 a->source = source;
133 hc_list_init(&a->slabs);
134 a->slab_size = slab_size;
135 return a;
136}
137
138void hc_slab_alloc_deinit(struct hc_slab_alloc *a) {
139 hc_list_do(&a->slabs, _s) {

Callers 2

slab_testsFunction · 0.85
run_slabFunction · 0.85

Calls 1

hc_list_initFunction · 0.85

Tested by 1

slab_testsFunction · 0.68