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:
VirtualAddress
andPhysicalAddress
. - “chunk” types:
Page
andFrame
. - ranges of chunks:
PageRange
andFrameRange
.
Structs
- A
Frame
is a chunk of physical memory aligned to a page boundary (default 4KiB) given by theP
parameter. - A range of
Frame
s that are contiguous in physical memory. - A
Page
is a chunk of virtual memory aligned to a page boundary (default 4KiB) given by theP
parameter. - 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
Page
s that are contiguous in virtual memory. - A physical memory address, which is a
usize
under the hood. - A virtual memory address, which is a
usize
under 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.