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
impl PhysAllocator
Sourcepub fn page_for(&mut self, pa: u64) -> Option<&mut VmPage>
pub fn page_for(&mut self, pa: u64) -> Option<&mut VmPage>
See vm_phys_paddr_to_vm_page
on the Orbis for a reference.
Sourcepub fn alloc_page(&self, vm: usize, pool: usize, order: usize) -> Option<VmPage>
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
Version | Offset |
---|---|
PS4 11.00 | 0x160520 |
Sourcefn alloc_freelist(
&self,
list: &[[VecDeque<VmPage>; 13]; 3],
pool: usize,
order: usize,
) -> Option<VmPage>
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
Version | Offset |
---|---|
PS4 11.00 | 0x1605D0 |
Sourcefn create_seg(
segs: &mut Vec<PhysSeg>,
ma: Option<&MemAffinity>,
start: u64,
end: u64,
)
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
Version | Offset |
---|---|
PS4 11.00 | 0x15F8A0 |
Auto Trait Implementations§
impl Freeze for PhysAllocator
impl RefUnwindSafe for PhysAllocator
impl Send for PhysAllocator
impl Sync for PhysAllocator
impl Unpin for PhysAllocator
impl UnwindSafe for PhysAllocator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more