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 4609D2C309 for ; Mon, 13 May 2019 18:57:50 -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 Gvmj9hKiFWj3 for ; Mon, 13 May 2019 18:57:50 -0400 (EDT) Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) (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 043262C100 for ; Mon, 13 May 2019 18:57:49 -0400 (EDT) Subject: [tarantool-patches] Re: [PATCH 0/3] introduce static allocator From: Vladislav Shpilevoy References: Message-ID: <4929acbd-7888-9ca4-af57-238f0ce876b4@tarantool.org> Date: Tue, 14 May 2019 01:57:45 +0300 MIME-Version: 1.0 In-Reply-To: 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 Cc: kostja@tarantool.org Pushed into the master, but with a change: tt_static_buf() now uses static_aligned_alloc with alignment by 'intptr_t'. So it can be used to allocate temporary arrays of any types. Note, that I kept tt_static.h header, because small/static is an allocator, not a string formatter. And I decided, that it should not include string-related utils, stdio.h header etc. On 28/04/2019 19:56, Vladislav Shpilevoy wrote: > The patchset 1) fixes a bug about static buffers duplication in each C-file > using them, 2) introduces static memory allocator to avoid temporary on-stack > and BSS allocations. > > Branch: http://github.com/tarantool/tarantool/tree/gerold103/small-static-alloc > > Vladislav Shpilevoy (3): > small: introduce small/static > Use static_alloc() instead of 'static char[]' where possible > sio: optimize sio_strfaddr() for the most common case > > src/box/call.c | 1 + > src/box/identifier.c | 2 +- > src/box/identifier.h | 1 - > src/box/iproto.cc | 3 +- > src/box/memtx_engine.c | 8 +-- > src/box/opt_def.c | 1 + > src/box/relay.cc | 2 +- > src/box/session.cc | 1 + > src/box/space_def.c | 1 + > src/box/space_def.h | 2 +- > src/box/sql/sqlLimit.h | 2 +- > src/box/tuple.h | 1 + > src/box/tuple_format.c | 1 + > src/box/user.cc | 1 + > src/box/vclock.c | 2 +- > src/box/vy_log.c | 2 +- > src/box/xlog.c | 24 +++---- > src/box/xlog.h | 2 +- > src/box/xrow.c | 2 +- > src/cfg.c | 15 ++--- > src/httpc.c | 7 +- > src/lib/coll/coll.c | 2 +- > src/lib/core/fio.c | 2 +- > src/lib/core/say.c | 1 + > src/lib/core/sio.c | 24 ++++--- > src/lib/core/tt_static.h | 118 ++++++++++++++++++++++++++++++++++ > src/lib/small | 2 +- > src/lib/swim/swim_io.h | 2 +- > src/lib/swim/swim_proto.h | 2 +- > src/lib/swim/swim_transport.h | 1 - > src/lib/uuid/tt_uuid.c | 2 +- > src/lua/utf8.c | 1 + > src/trivia/util.h | 53 --------------- > 33 files changed, 182 insertions(+), 109 deletions(-) > create mode 100644 src/lib/core/tt_static.h >