From: Konstantin Osipov <kostja@tarantool.org>
To: Vladislav Shpilevoy <v.shpilevoy@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 00:11:53 +0300 [thread overview]
Message-ID: <20190427211153.GB5662@atlas> (raw)
In-Reply-To: <0739fcb1c2659e40eadc2ca9ad03c1d19954626f.1556309762.git.v.shpilevoy@tarantool.org>
* 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.
--
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
next prev parent reply other threads:[~2019-04-27 21:11 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 ` Konstantin Osipov [this message]
2019-04-28 16:56 ` [tarantool-patches] " Vladislav Shpilevoy
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=20190427211153.GB5662@atlas \
--to=kostja@tarantool.org \
--cc=tarantool-patches@freelists.org \
--cc=v.shpilevoy@tarantool.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