mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-08-25 16:43:33 +03:00
Set reentrancy when invoking customized extent hooks.
Customized extent hooks may malloc / free thus trigger reentry. Support this behavior by adding reentrancy on hook functions.
This commit is contained in:
parent
d49ac4c709
commit
d6eb8ac8f3
5 changed files with 109 additions and 35 deletions
|
|
@ -1257,7 +1257,7 @@ arena_destroy(tsd_t *tsd, arena_t *arena) {
|
|||
* Destroy the base allocator, which manages all metadata ever mapped by
|
||||
* this arena.
|
||||
*/
|
||||
base_delete(arena->base);
|
||||
base_delete(tsd_tsdn(tsd), arena->base);
|
||||
}
|
||||
|
||||
static extent_t *
|
||||
|
|
@ -2061,7 +2061,7 @@ arena_new(tsdn_t *tsdn, unsigned ind, extent_hooks_t *extent_hooks) {
|
|||
return arena;
|
||||
label_error:
|
||||
if (ind != 0) {
|
||||
base_delete(base);
|
||||
base_delete(tsdn, base);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue