Extent -> Ehooks: Move purge_lazy hook.
This commit is contained in:
committed by
David Goldblatt
parent
f83fdf5336
commit
368baa42ef
@@ -126,3 +126,21 @@ ehooks_default_decommit(extent_hooks_t *extent_hooks, void *addr, size_t size,
|
||||
size_t offset, size_t length, unsigned arena_ind) {
|
||||
return ehooks_default_decommit_impl(addr, offset, length);
|
||||
}
|
||||
|
||||
#ifdef PAGES_CAN_PURGE_LAZY
|
||||
bool
|
||||
ehooks_default_purge_lazy_impl(void *addr, size_t offset, size_t length) {
|
||||
return pages_purge_lazy((void *)((uintptr_t)addr + (uintptr_t)offset),
|
||||
length);
|
||||
}
|
||||
|
||||
bool
|
||||
ehooks_default_purge_lazy(extent_hooks_t *extent_hooks, void *addr, size_t size,
|
||||
size_t offset, size_t length, unsigned arena_ind) {
|
||||
assert(addr != NULL);
|
||||
assert((offset & PAGE_MASK) == 0);
|
||||
assert(length != 0);
|
||||
assert((length & PAGE_MASK) == 0);
|
||||
return ehooks_default_purge_lazy_impl(addr, offset, length);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user