Skip to content
Snippets Groups Projects
Commit ad6dee69 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

Minor improvements.

parent 0a6d86d7
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ mslab_create(struct mslab *slab, struct mempool *pool)
}
/** Beginning of object data in the slab. */
void *
static inline void *
mslab_offset(struct mslab *slab)
{
return (char *) slab + mslab_sizeof() +
......
......@@ -206,7 +206,8 @@ smfree(struct small_alloc *alloc, void *ptr)
struct mslab *slab = (struct mslab *)
slab_from_ptr(alloc->cache, ptr, alloc->slab_order);
struct mempool *pool = slab->pool;
mempool_free(pool, ptr);
pool->slabs.stats.used -= pool->objsize;
mslab_free(pool, slab, ptr);
/*
* Don't keep around empty factored pools
* if the allocator is out of them.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment