| 42 | } |
| 43 | |
| 44 | void alloc_state_free_and_null(struct alloc_state **s_) |
| 45 | { |
| 46 | struct alloc_state *s = *s_; |
| 47 | |
| 48 | if (!s) |
| 49 | return; |
| 50 | |
| 51 | while (s->slab_nr > 0) { |
| 52 | s->slab_nr--; |
| 53 | free(s->slabs[s->slab_nr]); |
| 54 | } |
| 55 | |
| 56 | FREE_AND_NULL(s->slabs); |
| 57 | FREE_AND_NULL(*s_); |
| 58 | } |
| 59 | |
| 60 | static inline void *alloc_node(struct alloc_state *s, size_t node_size) |
| 61 | { |
no outgoing calls
no test coverage detected