mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-23 09:07:18 +03:00
Optimize away the tsd_fast() check on free fastpath.
To ensure that the free fastpath can tolerate uninitialized tsd, improved the static initializer for rtree_ctx in tsd.
This commit is contained in:
parent
26f5257b88
commit
4d56aaeca5
7 changed files with 48 additions and 38 deletions
|
|
@ -48,6 +48,13 @@ thd_start(void *arg) {
|
|||
int d = (int)(uintptr_t)arg;
|
||||
void *p;
|
||||
|
||||
/*
|
||||
* Test free before tsd init -- the free fast path (which does not
|
||||
* explicitly check for NULL) has to tolerate this case, and fall back
|
||||
* to free_default.
|
||||
*/
|
||||
free(NULL);
|
||||
|
||||
tsd_t *tsd = tsd_fetch();
|
||||
expect_x_eq(tsd_test_data_get(tsd), MALLOC_TSD_TEST_DATA_INIT,
|
||||
"Initial tsd get should return initialization value");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue