mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-24 03:42:14 +03:00
Fix extent_recycle() to exclude other arenas' extents.
When attempting to recycle an extent at a specified address, check that the extent belongs to the correct arena.
This commit is contained in:
parent
1cb399b630
commit
bc49157d21
1 changed files with 2 additions and 1 deletions
|
|
@ -408,7 +408,8 @@ extent_recycle(tsdn_t *tsdn, arena_t *arena, extent_hooks_t **r_extent_hooks,
|
|||
if (elm != NULL) {
|
||||
extent = rtree_elm_read_acquired(tsdn, &extents_rtree,
|
||||
elm);
|
||||
if (extent != NULL && (extent_active_get(extent) ||
|
||||
if (extent != NULL && (extent_arena_get(extent) != arena
|
||||
|| extent_active_get(extent) ||
|
||||
extent_retained_get(extent) == cache))
|
||||
extent = NULL;
|
||||
rtree_elm_release(tsdn, &extents_rtree, elm);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue