remove useless code in the empty_slabs path

pull/50/head
Daniel Micay 2018-08-30 05:42:45 -04:00
parent 29df2429c2
commit bb176e09bc
1 changed files with 1 additions and 4 deletions

View File

@ -304,12 +304,9 @@ static inline void *slab_allocate(size_t requested_size) {
struct slab_metadata *metadata = c->empty_slabs; struct slab_metadata *metadata = c->empty_slabs;
c->empty_slabs = c->empty_slabs->next; c->empty_slabs = c->empty_slabs->next;
metadata->next = c->partial_slabs; metadata->next = NULL;
metadata->prev = NULL; metadata->prev = NULL;
if (c->partial_slabs) {
c->partial_slabs->prev = metadata;
}
c->partial_slabs = metadata; c->partial_slabs = metadata;
void *slab = get_slab(c, slab_size, metadata); void *slab = get_slab(c, slab_size, metadata);