mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-28 11:23:08 +03:00
Move tsd link and in_hook after tcache.
This can lead to better cache utilization down the common paths where we don't touch the link.
This commit is contained in:
parent
50820010fe
commit
d1e11d48d4
4 changed files with 17 additions and 15 deletions
|
|
@ -130,9 +130,9 @@ hook_reentrantp() {
|
|||
*/
|
||||
static bool in_hook_global = true;
|
||||
tsdn_t *tsdn = tsdn_fetch();
|
||||
bool *in_hook = tsdn_in_hookp_get(tsdn);
|
||||
if (in_hook != NULL) {
|
||||
return in_hook;
|
||||
tcache_t *tcache = tsdn_tcachep_get(tsdn);
|
||||
if (tcache != NULL) {
|
||||
return &tcache->in_hook;
|
||||
}
|
||||
return &in_hook_global;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue