I tried to make the code as clean as possible, but I had a hard time figuring out what to do with the region type:
- Should it be as unstructured as it is now, allowing any address and any size? This has the disadvantage of having extra assertions and rounding invocations to make sure any mapping is done on a page-size aligned region.
- Should it use a wrapper type like
PageAligned<T>that can only ever contain multiples of the page size? This has the disadvantage of introducing yet another newtype and being a pain to upgrade everything to.
- Should it think in terms of multiples of the page size (maybe even change fmap2/funmap2 to input arguments in terms of this?!). While I was a fan of this at first, it seems like it would introduce duplicates of every function on region, having one
For now, I'm thinking I might leave is as-is. Hence, the MR is soon done
Depends on: syscall!55 (merged)