mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-05-16 18:06:22 +03:00
remove malloc_init() off the fastpath
This commit is contained in:
parent
997d86acc6
commit
325e3305fc
4 changed files with 23 additions and 10 deletions
12
src/tsd.c
12
src/tsd.c
|
|
@ -280,11 +280,13 @@ tsd_fetch_slow(tsd_t *tsd, bool minimal) {
|
|||
tsd_slow_update(tsd);
|
||||
} else if (tsd_state_get(tsd) == tsd_state_uninitialized) {
|
||||
if (!minimal) {
|
||||
tsd_state_set(tsd, tsd_state_nominal);
|
||||
tsd_slow_update(tsd);
|
||||
/* Trigger cleanup handler registration. */
|
||||
tsd_set(tsd);
|
||||
tsd_data_init(tsd);
|
||||
if (tsd_booted) {
|
||||
tsd_state_set(tsd, tsd_state_nominal);
|
||||
tsd_slow_update(tsd);
|
||||
/* Trigger cleanup handler registration. */
|
||||
tsd_set(tsd);
|
||||
tsd_data_init(tsd);
|
||||
}
|
||||
} else {
|
||||
tsd_state_set(tsd, tsd_state_minimal_initialized);
|
||||
tsd_set(tsd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue