From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 6CDD52C309 for ; Mon, 13 May 2019 18:57:11 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Re4Kabi_tSJ6 for ; Mon, 13 May 2019 18:57:11 -0400 (EDT) Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [94.100.177.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id C96BA2C100 for ; Mon, 13 May 2019 18:57:10 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH v2 small 1/1] small: introduce static allocator References: <20190513221129.GA11045@atlas> From: Vladislav Shpilevoy Message-ID: <602d1167-459f-855f-b41c-231d56434deb@tarantool.org> Date: Tue, 14 May 2019 01:57:05 +0300 MIME-Version: 1.0 In-Reply-To: <20190513221129.GA11045@atlas> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-Help: List-Unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-Subscribe: List-Owner: List-post: List-Archive: To: tarantool-patches@freelists.org, Konstantin Osipov Pushed into the master. On 14/05/2019 01:11, Konstantin Osipov wrote: > * Vladislav Shpilevoy [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 >