Pagemap requires registration of used space

This PR exposes a pagemap interface to specify ranges that are being
used. The overall invariant is that any memory in the address space
manager has the pagemap committed. This means that individual operations
do not need to commit entries.

This is important for Windows that does not support lazy commit.  It is
also important if we want to PROT_NONE most of the pagemap to reduce the
risk of memory safety issues getting access to the pagemap.

There are minor changes to test to pull memory directly from the Pal.
There are also bug fixes in the pagemap tests.
This commit is contained in:
Matthew Parkinson
2021-07-16 14:27:16 +01:00
committed by Matthew Parkinson
parent da01d5b4ca
commit 02d2ab8f7e
7 changed files with 115 additions and 172 deletions

View File

@@ -66,7 +66,7 @@ namespace snmalloc
snmalloc::register_clean_up();
}
static void init(CapPtr<void, CBChunk> base, size_t length)
static void init(void* base, size_t length)
{
get_backend_state().init(base, length);
}