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

Function add_slab

malloc2/malloc2.c:76–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74};
75
76static struct slab *add_slab(struct hc_slab_alloc *a, const size_t size) {
77 struct slab *s = hc_acquire(a->source, sizeof(struct slab) + size);
78 hc_list_push_front(&a->slabs, &s->slabs);
79 s->next = s->memory;
80 return s;
81}
82
83static struct slab *get_slab(struct hc_slab_alloc *a, const size_t size) {
84 if (size > a->slab_size) {

Callers 1

get_slabFunction · 0.85

Calls 1

hc_list_push_frontFunction · 0.85

Tested by

no test coverage detected