pub struct UmaZone {
bucket_enable: Arc<AtomicBool>,
bucket_keys: Arc<Vec<usize>>,
bucket_zones: Arc<Vec<UmaZone>>,
ty: ZoneType,
size: NonZero<usize>,
slab: unsafe fn(&Arc<UmaKeg>, Alloc) -> Option<Pin<Strong<Slab>>>,
init: Option<fn(*mut u8, NonZero<usize>, Alloc) -> bool>,
ctor: Option<fn(*mut u8, NonZero<usize>, Alloc) -> bool>,
dtor: Option<fn()>,
caches: CpuLocal<RefCell<UmaCache>>,
state: Mutex<ZoneState>,
}Expand description
Implementation of uma_zone structure.
Fields§
§bucket_enable: Arc<AtomicBool>§bucket_keys: Arc<Vec<usize>>§bucket_zones: Arc<Vec<UmaZone>>§ty: ZoneType§size: NonZero<usize>§slab: unsafe fn(&Arc<UmaKeg>, Alloc) -> Option<Pin<Strong<Slab>>>§init: Option<fn(*mut u8, NonZero<usize>, Alloc) -> bool>§ctor: Option<fn(*mut u8, NonZero<usize>, Alloc) -> bool>§dtor: Option<fn()>§caches: CpuLocal<RefCell<UmaCache>>§state: Mutex<ZoneState>Implementations§
Source§impl UmaZone
impl UmaZone
const ALIGN_CACHE: usize = 63
Sourcepub(super) fn new(
vm: &'static Vm,
bucket_enable: Arc<AtomicBool>,
bucket_keys: Arc<Vec<usize>>,
bucket_zones: Arc<Vec<UmaZone>>,
args: ZoneArgs,
) -> Self
pub(super) fn new( vm: &'static Vm, bucket_enable: Arc<AtomicBool>, bucket_keys: Arc<Vec<usize>>, bucket_zones: Arc<Vec<UmaZone>>, args: ZoneArgs, ) -> Self
pub fn size(&self) -> NonZero<usize>
Sourcepub unsafe fn free(&self, item: *mut u8)
pub unsafe fn free(&self, item: *mut u8)
See uma_zfree_arg on the Orbis for a reference.
§Safety
item either allocated from Self::alloc() or null.
§Reference offsets
| Version | Offset |
|---|---|
| PS4 11.00 | 0x13EFC0 |
fn alloc_from_cache(c: &mut UmaCache) -> *mut u8
Sourcefn alloc_bucket(&self, state: &mut ZoneState, flags: Alloc) -> bool
fn alloc_bucket(&self, state: &mut ZoneState, flags: Alloc) -> bool
See zone_alloc_bucket on the Orbis for a reference.
§Reference offsets
| Version | Offset |
|---|---|
| PS4 11.00 | 0x13EBA0 |
Auto Trait Implementations§
impl !Freeze for UmaZone
impl !RefUnwindSafe for UmaZone
impl !UnwindSafe for UmaZone
impl Send for UmaZone
impl Sync for UmaZone
impl Unpin for UmaZone
impl UnsafeUnpin for UmaZone
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