Crate memory_structs
source ·Expand description
This crate contains basic types used for memory management.
The types of interest are divided into three categories:
- addresses:
VirtualAddressandPhysicalAddress. - “chunk” types:
PageandFrame. - ranges of chunks:
PageRangeandFrameRange.
Structs
- A
Frameis a chunk of physical memory aligned to a page boundary (default 4KiB) given by thePparameter. - A range of
Frames that are contiguous in physical memory. - A
Pageis a chunk of virtual memory aligned to a page boundary (default 4KiB) given by thePparameter. - Marker struct used to indicate a page size of 1GiB.
- Marker struct used to indicate a page size of 2MiB.
- Marker struct used to indicate the default page size of 4KiB.
- A range of
Pages that are contiguous in virtual memory. - A physical memory address, which is a
usizeunder the hood. - A virtual memory address, which is a
usizeunder the hood.
Enums
- Enum used to indicate the size of a page or frame.
- The possible states that a range of exclusively-owned pages or frames can be in.
Traits
- Trait that represents the size of a page or frame, i.e., for normal or huge pages.