pub struct UmaZone<T> {
bucket_enable: Arc<AtomicBool>,
bucket_keys: Arc<Vec<usize>>,
bucket_zones: Arc<Vec<UmaZone<StdFree>>>,
ty: ZoneType,
size: NonZero<usize>,
slab: fn(&Self, &mut ZoneState<T>, Option<&Arc<UmaKeg<T>>>, Alloc) -> Option<NonNull<Slab<T>>>,
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<T>>,
}Expand description
Implementation of uma_zone structure.
Fields§
§bucket_enable: Arc<AtomicBool>§bucket_keys: Arc<Vec<usize>>§bucket_zones: Arc<Vec<UmaZone<StdFree>>>§ty: ZoneType§size: NonZero<usize>§slab: fn(&Self, &mut ZoneState<T>, Option<&Arc<UmaKeg<T>>>, Alloc) -> Option<NonNull<Slab<T>>>§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<T>>Implementations§
Source§impl<T: FreeItem> UmaZone<T>
impl<T: FreeItem> UmaZone<T>
const ALIGN_CACHE: usize = 63
Source§impl<T> UmaZone<T>
impl<T> UmaZone<T>
pub fn size(&self) -> NonZero<usize>
fn alloc_from_cache(c: &mut UmaCache) -> *mut u8
Auto Trait Implementations§
impl<T> !Freeze for UmaZone<T>
impl<T> !RefUnwindSafe for UmaZone<T>
impl<T> Send for UmaZone<T>where
T: Send,
impl<T> Sync for UmaZone<T>where
T: Send,
impl<T> Unpin for UmaZone<T>
impl<T> UnsafeUnpin for UmaZone<T>
impl<T> !UnwindSafe for UmaZone<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