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

Fix a bug with wrong defaults when initializing the small object allocator.

tuple.cc passed wrong parameters to small_alloc_create - prealloc
size instead of slab size, and slab size instead of prealloc size.

When correct parameters were supplied, it turned out that
objsize_max is calculated wrongly, and the last factor pool
in small allocator is too framgented (uses 3 empty slots instead
of 4, with 25% overhead).

The problem would not show up in any test, only increase
memory fragmentation.

This patch also fixes this problem.
parent ad6dee69
No related merge requests found
Loading
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