NFC: Introduce and switch to pal_zero

This wrapper will allow us to pass `AuthPtr<T,B> p` to zero() without needing to
write `p.unsafe_auth_ptr` to get to a `T*` inside.  Moreover, it will give us a
convenient point to assert that `B` is such that the pointer can be used to
manipulate the memory map (i.e. is not exported).
This commit is contained in:
Nathaniel Filardo
2021-04-01 00:07:21 +01:00
committed by Nathaniel Wesley Filardo
parent 4cfcf344fc
commit 7f841ff081
5 changed files with 18 additions and 7 deletions

View File

@@ -94,7 +94,7 @@ namespace snmalloc
self->free--;
if constexpr (zero_mem == YesZero)
PAL::zero(p, size);
pal_zero<PAL>(p, size);
else
UNUSED(size);