mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-26 10:37:19 +03:00
Extent -> Ehooks: Move split hook.
This commit is contained in:
parent
a5b42a1a10
commit
1fff4d2ee3
3 changed files with 37 additions and 31 deletions
20
src/ehooks.c
20
src/ehooks.c
|
|
@ -162,3 +162,23 @@ ehooks_default_purge_forced(extent_hooks_t *extent_hooks, void *addr,
|
|||
return ehooks_default_purge_forced_impl(addr, offset, length);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool
|
||||
ehooks_default_split_impl() {
|
||||
if (!maps_coalesce) {
|
||||
/*
|
||||
* Without retain, only whole regions can be purged (required by
|
||||
* MEM_RELEASE on Windows) -- therefore disallow splitting. See
|
||||
* comments in extent_head_no_merge().
|
||||
*/
|
||||
return !opt_retain;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
ehooks_default_split(extent_hooks_t *extent_hooks, void *addr, size_t size,
|
||||
size_t size_a, size_t size_b, bool committed, unsigned arena_ind) {
|
||||
return ehooks_default_split_impl();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue