Struct kernel::pages::Pages[][src]

pub struct Pages<const ORDER: u32> { /* fields omitted */ }
Expand description

A set of physical pages.

Pages holds a reference to a set of pages of order ORDER. Having the order as a generic const allows the struct to have the same size as a pointer.

Invariants

The pointer Pages::pages is valid and points to 2^ORDER pages.

Implementations

Allocates a new set of contiguous pages.

Maps a single page at the given address in the given VM area.

This is only meant to be used by pages of order 0.

Copies data from the given UserSlicePtrReader into the pages.

Maps the pages and reads from them into the given buffer.

Safety

Callers must ensure that the destination buffer is valid for the given length. Additionally, if the raw buffer is intended to be recast, they must ensure that the data can be safely cast; crate::io_buffer::ReadableFromBytes has more details about it.

Maps the pages and writes into them from the given bufer.

Safety

Callers must ensure that the buffer is valid for the given length. Additionally, if the page is (or will be) mapped by userspace, they must ensure that no kernel data is leaked through padding if it was cast from another type; crate::io_buffer::WritableToBytes has more details about it.

Trait Implementations

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.