Extent -> Ehooks: Move dalloc hook.
This commit is contained in:
committed by
David Goldblatt
parent
dc8b4e6e13
commit
bac8e2e5a6
@@ -75,3 +75,17 @@ ehooks_default_alloc(extent_hooks_t *extent_hooks, void *new_addr, size_t size,
|
||||
ALIGNMENT_CEILING(alignment, PAGE), zero, commit,
|
||||
arena_ind_get(arena));
|
||||
}
|
||||
|
||||
bool
|
||||
ehooks_default_dalloc_impl(void *addr, size_t size) {
|
||||
if (!have_dss || !extent_in_dss(addr)) {
|
||||
return extent_dalloc_mmap(addr, size);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
ehooks_default_dalloc(extent_hooks_t *extent_hooks, void *addr, size_t size,
|
||||
bool committed, unsigned arena_ind) {
|
||||
return ehooks_default_dalloc_impl(addr, size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user