mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-26 00:53:34 +03:00
Bypass extent tracking for auto arenas.
Tracking extents is required by arena_reset. To support this, the extent linkage was used for tracking 1) large allocations, and 2) full slabs. However modifying the extent linkage could be an expensive operation as it likely incurs cache misses. Since we forbid arena_reset on auto arenas, let's bypass the linkage operations for auto arenas.
This commit is contained in:
parent
fed9a880c8
commit
5aa46f027d
6 changed files with 49 additions and 32 deletions
|
|
@ -1846,13 +1846,8 @@ arena_i_reset_destroy_helper(tsd_t *tsd, const size_t *mib, size_t miblen,
|
|||
WRITEONLY();
|
||||
MIB_UNSIGNED(*arena_ind, 1);
|
||||
|
||||
if (*arena_ind < narenas_auto) {
|
||||
ret = EFAULT;
|
||||
goto label_return;
|
||||
}
|
||||
|
||||
*arena = arena_get(tsd_tsdn(tsd), *arena_ind, false);
|
||||
if (*arena == NULL) {
|
||||
if (*arena == NULL || arena_is_auto(*arena)) {
|
||||
ret = EFAULT;
|
||||
goto label_return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue