-
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit b521678
Add
* All chunk-related types are now parameterized with a `P: PageSize`
type parameter:
* `Page` and `Frame`, which ensure that the underlying virtual
or physical address is always properly aligned to the specified size.
* `PageRange` and `FrameRange`, which ensure that the range of
pages or frames are correctly aligned and only can be created
in granular chunks of the given `PageSize`.
* When iterating over a range of huge pages or frames, each step
will be at the granularity of one huge page, which makes it easy
to iterate of huge pages and huge frames in lockstep.
* There are various implementations of the conversion traits
`From` and `TryFrom` for normal and huge pages/frames and ranges.
* The `PageSize` parameter can only be one of 3 marker structs:
1. `Page4K`: a normal 4KiB page (P1-level), which is the default.
2. `Page2M`: a P2-level huge page.
3. `Page1G`: a P3-level huge page.
* This is only relevant to x86_64 at the moment, though we may add
aarch64 huge page sizes in the future too.
Co-authored-by: Kevin Boos <[email protected]>PageSize
trait for defining 4K, 2M, and 1G huge pages (#1031)1 parent 349adf8 commit b521678Copy full SHA for b521678
0 commit comments