Struct UmaZone

Source
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

Source

const ALIGN_CACHE: usize = 63usize

Source

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

See zone_ctor on Orbis for a reference.

§Reference offsets
VersionOffset
PS4 11.000x13D490
Source

pub fn size(&self) -> NonZero<usize>

Source

pub fn alloc(&self, flags: Alloc) -> *mut u8

See uma_zalloc_arg on the Orbis for a reference.

§Reference offsets
VersionOffset
PS4 11.000x13E750
Source

fn alloc_from_cache(c: &mut UmaCache) -> *mut u8

Source

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
VersionOffset
PS4 11.000x13EBA0
Source

fn alloc_item(&self, flags: Alloc) -> *mut u8

See zone_alloc_item on the Orbis for a reference.

§Reference offsets
VersionOffset
PS4 11.000x13DD50
Source

fn fetch_slab(&self, keg: Option<&mut UmaKeg>, flags: Alloc) -> Option<()>

See zone_fetch_slab on the Orbis for a reference.

§Reference offsets
VersionOffset
PS4 11.000x141DB0

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.