pub struct UmaKeg {
vm: &'static Vm,
size: NonZero<usize>,
rsize: usize,
pgoff: usize,
ppera: usize,
ipers: usize,
alloc: fn(&'static Vm, Alloc) -> (*mut u8, SlabFlags),
init: Option<fn()>,
max_pages: usize,
recurse: AtomicU32,
flags: UmaFlags,
state: Mutex<KegState>,
}Expand description
Implementation of uma_keg structure.
Fields§
§vm: &'static Vm§size: NonZero<usize>§rsize: usize§pgoff: usize§ppera: usize§ipers: usize§alloc: fn(&'static Vm, Alloc) -> (*mut u8, SlabFlags)§init: Option<fn()>§max_pages: usize§recurse: AtomicU32§flags: UmaFlags§state: Mutex<KegState>Implementations§
Source§impl UmaKeg
impl UmaKeg
Sourcepub(super) fn new(
vm: &'static Vm,
size: NonZero<usize>,
align: usize,
init: Option<fn()>,
flags: UmaFlags,
) -> Arc<Self>
pub(super) fn new( vm: &'static Vm, size: NonZero<usize>, align: usize, init: Option<fn()>, flags: UmaFlags, ) -> Arc<Self>
align is the actual alignment minus one, which mean if you want each item to be 8
bytes alignment this value will be 7.
See keg_ctor on the Orbis for a reference.
§Reference offsets
| Version | Offset |
|---|---|
| PS4 11.00 | 0x13CF40 |
pub fn size(&self) -> NonZero<usize>
pub fn allocated_size(&self) -> usize
pub fn item_per_slab(&self) -> usize
pub fn recurse(&self) -> u32
pub fn flags(&self) -> UmaFlags
pub(super) fn state(&self) -> &Mutex<KegState>
Sourcepub unsafe fn fetch_slab(
self: &Arc<Self>,
flags: Alloc,
) -> Option<Pin<Strong<Slab>>>
pub unsafe fn fetch_slab( self: &Arc<Self>, flags: Alloc, ) -> Option<Pin<Strong<Slab>>>
Unlike Orbis, our slab contains a strong reference to its keg. That mean you don’t need to keep the keg alive manually.
See keg_fetch_slab on the Orbis for a reference.
§Reference offsets
| Version | Offset |
|---|---|
| PS4 11.00 | 0x141E20 |
Auto Trait Implementations§
impl !Freeze for UmaKeg
impl !RefUnwindSafe for UmaKeg
impl !UnwindSafe for UmaKeg
impl Send for UmaKeg
impl Sync for UmaKeg
impl Unpin for UmaKeg
impl UnsafeUnpin for UmaKeg
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