#[repr(C)]pub(crate) struct GcHeap<T: ?Sized> {
header: UnsafeCell<GcHeader>,
data: T,
}
Expand description
A block of memory allocated on the heap that is managed by the garbage collector.
Fields§
§header: UnsafeCell<GcHeader>
§data: T
Implementations§
Source§impl GcHeap<SymbolCellInner>
impl GcHeap<SymbolCellInner>
const NULL: *mut u8 = {0x0 as *mut u8}
const EMTPTY: AtomicPtr<u8> = _
fn new_normal(name: &'static str, block: &Block<true>) -> Self
pub(in core) const fn new_static( name: &'static str, ) -> Self
pub(in core) const fn new_static_special( name: &'static str, ) -> Self
fn new_const(name: &'static str, _block: &Block<true>) -> Self
pub(in core) const fn new_static_const( name: &'static str, ) -> Self
fn new_uninterned<const C: bool>(name: &str, bk: &Block<C>) -> Self
Source§impl<T> GcHeap<T>
impl<T> GcHeap<T>
pub(in core) const fn new( data: T, constant: bool, ) -> Self
Sourcepub(in core) const fn new_pure(
data: T,
) -> Self
pub(in core) const fn new_pure( data: T, ) -> Self
Allocate a new object that is not managed by the garbage collector. This is used for “pure” storage of objects that are allocated at the start of the program and never freed. Only used for the Symbol map at the moment.
fn header(&self) -> &GcHeader
pub(in core) fn forward( &self, fwd_ptr: NonNull<u8>, )
pub(in core) fn allocation_state( &self, ) -> AllocState
fn is_marked(&self) -> bool
Trait Implementations§
Source§impl IntoObject for GcHeap<SymbolCellInner>
impl IntoObject for GcHeap<SymbolCellInner>
Source§impl PartialEq for GcHeap<SymbolCellInner>
impl PartialEq for GcHeap<SymbolCellInner>
impl<T: Eq> Eq for GcHeap<T>
impl<T: Sync> Sync for GcHeap<T>
Auto Trait Implementations§
impl<T> !Freeze for GcHeap<T>
impl<T> !RefUnwindSafe for GcHeap<T>
impl<T> Send for GcHeap<T>
impl<T> Unpin for GcHeap<T>
impl<T> UnwindSafe for GcHeap<T>where
T: UnwindSafe + ?Sized,
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.