This PR attempts to tackle the problem outlined in PR #12 by ensuring that Mmap::map_none() only reserves a region in the virtual address space, but does not yet allocate any physical pages for that region. This behavior should align well with the behavior of other platforms.
Since the user has no access to the page, it should be safe to simply reserve but not commit the memory mapping avoiding the need for UnsafeFlags for this particular use case.
When using one of the functions to change the protection of the memory mapping, and the memory mapping is not yet in a committed state, we commit the pages.
The use case of committing pages with the no access protection will be supported in a separate commit.
This PR attempts to tackle the problem outlined in PR #12 by ensuring that
Mmap::map_none()
only reserves a region in the virtual address space, but does not yet allocate any physical pages for that region. This behavior should align well with the behavior of other platforms.Since the user has no access to the page, it should be safe to simply reserve but not commit the memory mapping avoiding the need for
UnsafeFlags
for this particular use case.When using one of the functions to change the protection of the memory mapping, and the memory mapping is not yet in a committed state, we commit the pages.
The use case of committing pages with the no access protection will be supported in a separate commit.