Remove address space usage from Pagemap.

The pagemap allocates it self directly either from

  * the original fixed address range it is supplied, and returns the
    remaining space after the pagemap is removed; or
  * directly allocated from the PAL without using the address space
    manager.

This change in layering is required for the next commit, which imposes
the invariant that the pagemap has been committed for all spaced managed
by the address space manager.
This commit is contained in:
Matthew Parkinson
2021-07-16 10:36:13 +01:00
committed by Matthew Parkinson
parent 686cb3321f
commit da01d5b4ca
4 changed files with 101 additions and 34 deletions

View File

@@ -194,6 +194,13 @@ namespace snmalloc
#endif
}
template<typename T = void, enum capptr_bounds bounds>
inline CapPtr<T, bounds>
pointer_align_down(CapPtr<void, bounds> p, size_t alignment)
{
return CapPtr<T, bounds>(pointer_align_down<T>(p.unsafe_ptr(), alignment));
}
/**
* Align a pointer up to a dynamically specified granularity, which must
* be a power of two.