pub struct UmaZone {Show 14 fields
bucket_enable: Arc<AtomicBool>,
bucket_keys: Arc<Vec<usize>>,
bucket_zones: Arc<Vec<UmaZone>>,
ty: ZoneType,
size: NonZero<usize>,
kegs: Gutex<LinkedList<UmaKeg>>,
slab: fn(&Self, Option<&mut UmaKeg>, Alloc) -> Option<()>,
caches: CpuLocal<RefCell<UmaCache>>,
full_buckets: Gutex<VecDeque<UmaBox<UmaBucket<[BucketItem]>>>>,
free_buckets: Gutex<VecDeque<UmaBox<UmaBucket<[BucketItem]>>>>,
alloc_count: Gutex<u64>,
free_count: Gutex<u64>,
count: Gutex<usize>,
flags: UmaFlags,
}
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>
§kegs: Gutex<LinkedList<UmaKeg>>
§slab: fn(&Self, Option<&mut UmaKeg>, Alloc) -> Option<()>
§caches: CpuLocal<RefCell<UmaCache>>
§full_buckets: Gutex<VecDeque<UmaBox<UmaBucket<[BucketItem]>>>>
§free_buckets: Gutex<VecDeque<UmaBox<UmaBucket<[BucketItem]>>>>
§alloc_count: Gutex<u64>
§free_count: Gutex<u64>
§count: Gutex<usize>
§flags: UmaFlags
Implementations§
Source§impl UmaZone
impl UmaZone
const ALIGN_CACHE: usize = 63usize
Sourcepub(super) fn new(
vm: Arc<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>,
flags: impl Into<UmaFlags>,
) -> Self
pub(super) fn new( vm: Arc<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>, flags: impl Into<UmaFlags>, ) -> Self
pub fn size(&self) -> NonZero<usize>
fn alloc_from_cache(c: &mut UmaCache) -> *mut u8
Sourcefn alloc_bucket(
&self,
frees: GutexWrite<'_, VecDeque<UmaBox<UmaBucket<[BucketItem]>>>>,
count: GutexWrite<'_, usize>,
flags: Alloc,
) -> bool
fn alloc_bucket( &self, frees: GutexWrite<'_, VecDeque<UmaBox<UmaBucket<[BucketItem]>>>>, count: GutexWrite<'_, usize>, flags: Alloc, ) -> bool
See zone_alloc_bucket
on the Orbis for a reference.
§Reference offsets
Version | Offset |
---|---|
PS4 11.00 | 0x13EBA0 |
Sourcefn alloc_item(&self, flags: Alloc) -> *mut u8
fn alloc_item(&self, flags: Alloc) -> *mut u8
Auto Trait Implementations§
impl !Freeze for UmaZone
impl !RefUnwindSafe for UmaZone
impl Send for UmaZone
impl Sync for UmaZone
impl Unpin 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