memtx: change small allocator behavior
Previously, in small allocator, memory pools were allocated at the request, which in the case of a small slab_alloc_factor led to use pools with incorrect sizes. This patch changed small allocator behavior, now we allocate pools on the stage of allocator creation. Also we use special function to find appropriate pool, which is faster, then previous version with rbtree. This change fixes #5216. Also moved a check, that the slab_alloc_factor is in the range (1.0, 2.0] from small allocator to memtx_engine. If factor is not in range change it to 1.0001 or 2.0 respectively Closes #5216
Showing
- src/box/memtx_engine.c 14 additions, 1 deletionsrc/box/memtx_engine.c
- src/box/tuple.c 2 additions, 1 deletionsrc/box/tuple.c
- test/engine/engine.cfg 3 additions, 0 deletionstest/engine/engine.cfg
- test/engine/gh-5216-small_alloc_factor.lua 11 additions, 0 deletionstest/engine/gh-5216-small_alloc_factor.lua
- test/engine/gh-5216-small_alloc_factor.result 70 additions, 0 deletionstest/engine/gh-5216-small_alloc_factor.result
- test/engine/gh-5216-small_alloc_factor.test.lua 20 additions, 0 deletionstest/engine/gh-5216-small_alloc_factor.test.lua
Loading
Please register or sign in to comment