diff options
author | somov <somov@yandex-team.ru> | 2022-02-10 16:45:47 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:47 +0300 |
commit | a5950576e397b1909261050b8c7da16db58f10b1 (patch) | |
tree | 7ba7677f6a4c3e19e2cefab34d16df2c8963b4d4 /contrib/libs/jemalloc | |
parent | 81eddc8c0b55990194e112b02d127b87d54164a9 (diff) | |
download | ydb-a5950576e397b1909261050b8c7da16db58f10b1.tar.gz |
Restoring authorship annotation for <somov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/jemalloc')
-rw-r--r-- | contrib/libs/jemalloc/reg_zone.cpp | 46 | ||||
-rw-r--r-- | contrib/libs/jemalloc/src/jemalloc.c | 4 |
2 files changed, 25 insertions, 25 deletions
diff --git a/contrib/libs/jemalloc/reg_zone.cpp b/contrib/libs/jemalloc/reg_zone.cpp index 6a7b9d69e1..8503cd48f7 100644 --- a/contrib/libs/jemalloc/reg_zone.cpp +++ b/contrib/libs/jemalloc/reg_zone.cpp @@ -1,33 +1,33 @@ -#include <util/system/compiler.h> - +#include <util/system/compiler.h> + extern "C" void je_zone_register(); -static volatile bool initialized = false; - +static volatile bool initialized = false; + namespace { - struct TInit { + struct TInit { inline TInit() { - if (!initialized) { + if (!initialized) { je_zone_register(); - initialized = true; - } + initialized = true; + } } - }; - + }; + void zone_register() { - static TInit init; - } + static TInit init; + } } - -extern "C" { + +extern "C" { void je_assure_zone_register() { - if (Y_LIKELY(initialized)) { - return; - } - - // Even if we have read false "initialized", real init will be syncronized once by - // Meyers singleton in <anonymous>::register_zone(). We could do a few - // redundant "initialized" and singleton creation checks, but no more than that. + if (Y_LIKELY(initialized)) { + return; + } + + // Even if we have read false "initialized", real init will be syncronized once by + // Meyers singleton in <anonymous>::register_zone(). We could do a few + // redundant "initialized" and singleton creation checks, but no more than that. zone_register(); - } -} + } +} diff --git a/contrib/libs/jemalloc/src/jemalloc.c b/contrib/libs/jemalloc/src/jemalloc.c index 63ff26b656..5dd1f3ac46 100644 --- a/contrib/libs/jemalloc/src/jemalloc.c +++ b/contrib/libs/jemalloc/src/jemalloc.c @@ -1894,7 +1894,7 @@ struct dynamic_opts_s { unsigned tcache_ind; unsigned arena_ind; }; - + JEMALLOC_ALWAYS_INLINE void dynamic_opts_init(dynamic_opts_t *dynamic_opts) { dynamic_opts->result = NULL; @@ -1906,7 +1906,7 @@ dynamic_opts_init(dynamic_opts_t *dynamic_opts) { dynamic_opts->tcache_ind = TCACHE_IND_AUTOMATIC; dynamic_opts->arena_ind = ARENA_IND_AUTOMATIC; } - + /* ind is ignored if dopts->alignment > 0. */ JEMALLOC_ALWAYS_INLINE void * imalloc_no_sample(static_opts_t *sopts, dynamic_opts_t *dopts, tsd_t *tsd, |