pub struct UmaKeg<T> {
vm: Arc<Vm>,
size: NonZero<usize>,
rsize: usize,
pgoff: usize,
ppera: usize,
ipers: usize,
alloc: fn(&Vm, Alloc) -> *mut u8,
init: Option<fn()>,
max_pages: usize,
recurse: AtomicU32,
flags: UmaFlags,
state: Mutex<KegState<T>>,
}Expand description
Implementation of uma_keg structure.
Fields§
§vm: Arc<Vm>§size: NonZero<usize>§rsize: usize§pgoff: usize§ppera: usize§ipers: usize§alloc: fn(&Vm, Alloc) -> *mut u8§init: Option<fn()>§max_pages: usize§recurse: AtomicU32§flags: UmaFlags§state: Mutex<KegState<T>>Implementations§
Source§impl<T: FreeItem> UmaKeg<T>
impl<T: FreeItem> UmaKeg<T>
Sourcepub(super) fn new(
vm: Arc<Vm>,
size: NonZero<usize>,
align: usize,
init: Option<fn()>,
flags: UmaFlags,
) -> Self
pub(super) fn new( vm: Arc<Vm>, size: NonZero<usize>, align: usize, init: Option<fn()>, flags: UmaFlags, ) -> 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 |
Source§impl<T> UmaKeg<T>
impl<T> UmaKeg<T>
Source§impl<T: FreeItem> UmaKeg<T>
impl<T: FreeItem> UmaKeg<T>
Sourcepub fn fetch_slab(self: &Arc<Self>, flags: Alloc) -> Option<NonNull<Slab<T>>>
pub fn fetch_slab(self: &Arc<Self>, flags: Alloc) -> Option<NonNull<Slab<T>>>
Unlike Orbis, our slab contains a strong reference to its keg. That mean all allocated slabs need to free manually otherwise the keg will be leak.
See keg_fetch_slab on the Orbis for a reference.
§Reference offsets
| Version | Offset |
|---|---|
| PS4 11.00 | 0x141E20 |
Auto Trait Implementations§
impl<T> !Freeze for UmaKeg<T>
impl<T> !RefUnwindSafe for UmaKeg<T>
impl<T> Send for UmaKeg<T>where
T: Send,
impl<T> Sync for UmaKeg<T>where
T: Send,
impl<T> Unpin for UmaKeg<T>
impl<T> UnsafeUnpin for UmaKeg<T>
impl<T> !UnwindSafe for UmaKeg<T>
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