From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Konstantin Osipov <kostja@tarantool.org>
Cc: tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH 1/1] core: make tt_static buffers a singleton array
Date: Sun, 28 Apr 2019 19:56:36 +0300 [thread overview]
Message-ID: <554d070c-1a24-92a0-11e4-d20328692c5c@tarantool.org> (raw)
In-Reply-To: <20190427211153.GB5662@atlas>
On 28/04/2019 00:11, Konstantin Osipov wrote:
> * Vladislav Shpilevoy <v.shpilevoy@tarantool.org> [19/04/27 15:39]:
>> tt_static_buf() is a function rotating 4 thread local buffers
>> declared inside this function as 'static' variables. They are
>> used very often for a plenty of purposes from string formatting
>> to small MessagePack encoding/decoding.
>>
>> This array of 4 buffers was supposed to be a singleton object,
>> but function tt_static_buf() did not belong to a one certain
>> linking item - it was 'static inline' function in a header
>> 'trivia/util.h'. It means that *each* linking item (each .c file
>> using these buffers) included its own version of this function
>> with its own *copy* of these 4 buffers.
>>
>> Totally there were nearly 50 copies of 4Kb buffer in various
>> files, according to the difference seen in 'vmmap' program on
>> Mac (like /proc/pid/maps on Linux). This patch frees 200Kb of
>> BSS section.
>
> OK to push. Please push to 2.1 and 1.10 as well.
I will not push this commit into the master, because it is
fixed by the static memory allocator. See the new mail thread.
Talking of 1.10 and 2.1 - I could push if you approve that the
bug will be fixed differently in 1.10/2.1 vs the master. Not
sure if we should push a new allocator into these branches.
>
>
> --
> Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
>
next prev parent reply other threads:[~2019-04-28 16:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-26 20:19 [tarantool-patches] " Vladislav Shpilevoy
2019-04-27 21:11 ` [tarantool-patches] " Konstantin Osipov
2019-04-28 16:56 ` Vladislav Shpilevoy [this message]
2019-04-28 18:31 ` Konstantin Osipov
2019-04-28 19:05 ` Vladislav Shpilevoy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=554d070c-1a24-92a0-11e4-d20328692c5c@tarantool.org \
--to=v.shpilevoy@tarantool.org \
--cc=kostja@tarantool.org \
--cc=tarantool-patches@freelists.org \
--subject='[tarantool-patches] Re: [PATCH 1/1] core: make tt_static buffers a singleton array' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox