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(&mut UmaKeg, Alloc) -> Option<NonNull<Slab>>,
init: Option<fn(*mut u8, NonZero<usize>, Alloc) -> bool>,
ctor: Option<fn(*mut u8, NonZero<usize>, Alloc) -> bool>,
caches: CpuLocal<RefCell<UmaCache>>,
flags: UmaFlags,
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(&mut UmaKeg, Alloc) -> Option<NonNull<Slab>>§init: Option<fn(*mut u8, NonZero<usize>, Alloc) -> bool>§ctor: Option<fn(*mut u8, NonZero<usize>, Alloc) -> bool>§caches: CpuLocal<RefCell<UmaCache>>§flags: UmaFlags§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>>,
name: impl Into<String>,
keg: Option<UmaKeg>,
size: NonZero<usize>,
align: Option<usize>,
init: Option<fn()>,
flags: impl Into<UmaFlags>,
) -> Self
pub(super) fn new( vm: &'static Vm, bucket_enable: Arc<AtomicBool>, bucket_keys: Arc<Vec<usize>>, bucket_zones: Arc<Vec<UmaZone>>, name: impl Into<String>, keg: Option<UmaKeg>, size: NonZero<usize>, align: Option<usize>, init: Option<fn()>, flags: impl Into<UmaFlags>, ) -> Self
pub fn size(&self) -> NonZero<usize>
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 Send for UmaZone
impl Sync for UmaZone
impl Unpin for UmaZone
impl UnsafeUnpin for UmaZone
impl !UnwindSafe 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