Struct PhysAllocator

Source
pub struct PhysAllocator {
    segs: Vec<PhysSeg>,
    nfree: usize,
    lookup_lists: [Arc<[[[VecDeque<VmPage>; 13]; 3]; 2]>; 2],
}
Expand description

Provides methods to allocate physical memory.

Fields§

§segs: Vec<PhysSeg>§nfree: usize§lookup_lists: [Arc<[[[VecDeque<VmPage>; 13]; 3]; 2]>; 2]

Implementations§

Source§

impl PhysAllocator

Source

pub fn new(phys_avail: &[u64; 61], ma: Option<&MemAffinity>) -> Self

See vm_phys_init on the Orbis for a reference.

§Reference offsets
VersionOffset
PS4 11.000x15F410
Source

pub fn page_for(&mut self, pa: u64) -> Option<&mut VmPage>

See vm_phys_paddr_to_vm_page on the Orbis for a reference.

Source

pub fn alloc_page(&self, vm: usize, pool: usize, order: usize) -> Option<VmPage>

See vm_phys_alloc_pages on the Orbis for a reference.

§Reference offsets
VersionOffset
PS4 11.000x160520
Source

fn alloc_freelist( &self, list: &[[VecDeque<VmPage>; 13]; 3], pool: usize, order: usize, ) -> Option<VmPage>

See vm_phys_alloc_freelist_pages on the Orbis for a reference.

§Reference offsets
VersionOffset
PS4 11.000x1605D0
Source

fn create_seg( segs: &mut Vec<PhysSeg>, ma: Option<&MemAffinity>, start: u64, end: u64, )

See vm_phys_create_seg on the Orbis for a reference.

§Reference offsets
VersionOffset
PS4 11.000x15F8A0

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.