mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-06-23 20:35:46 +03:00
Fix extent_alloc_dss() regressions.
Page-align the gap, if any, and add/use extent_dalloc_gap(), which registers the gap extent before deallocation.
This commit is contained in:
parent
c4bb17f891
commit
4e910fc958
4 changed files with 33 additions and 22 deletions
12
src/extent.c
12
src/extent.c
|
|
@ -732,6 +732,18 @@ extent_record(tsdn_t *tsdn, arena_t *arena, extent_hooks_t **r_extent_hooks,
|
|||
malloc_mutex_unlock(tsdn, &arena->extents_mtx);
|
||||
}
|
||||
|
||||
void
|
||||
extent_dalloc_gap(tsdn_t *tsdn, arena_t *arena, extent_t *extent)
|
||||
{
|
||||
extent_hooks_t *extent_hooks = EXTENT_HOOKS_INITIALIZER;
|
||||
|
||||
if (extent_register(tsdn, extent)) {
|
||||
extent_leak(tsdn, arena, &extent_hooks, false, extent);
|
||||
return;
|
||||
}
|
||||
extent_dalloc_wrapper(tsdn, arena, &extent_hooks, extent);
|
||||
}
|
||||
|
||||
void
|
||||
extent_dalloc_cache(tsdn_t *tsdn, arena_t *arena,
|
||||
extent_hooks_t **r_extent_hooks, extent_t *extent)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue