[tarantool-patches] Re: [PATCH v2 small 1/1] small: introduce static allocator

Konstantin Osipov kostja at tarantool.org
Tue May 14 01:11:29 MSK 2019


* Vladislav Shpilevoy <v.shpilevoy at tarantool.org> [19/05/14 00:58]:

OK to push.

> Currently Tarantool has a global thread local array of 4 static
> buffers, each 1028 bytes. It provides an API tt_static_buf()
> allowing to return them one by one in a cycle. But sometimes it
> is needed to obtain a bit bigger buffer, or on the contrary -
> many smaller buffers. For example, to store a UDP packet -
> ~1.5Kb, or a small array of integers, probably not fitting into
> 1028 bytes.
> 
> This patch introduces a cyclic allocator having static thread
> local buffer with fixed size 4096 * 3 bytes, and provides an API
> to slice it by any smaller sizes. When the buffer is done, it is
> recycled.
> 
> This allocator will allow to drop tt_static buffers and lots of
> other static thread local buffers scattered over Tarantool source
> code.
> ---
> Branch: https://github.com/tarantool/small/tree/gerold103/static-allocator

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32




More information about the Tarantool-patches mailing list