pub struct AllocExtra<'tcx> {
pub borrow_tracker: Option<AllocState>,
pub data_race: Option<VClockAlloc>,
pub weak_memory: Option<StoreBufferAlloc>,
pub backtrace: Option<Vec<FrameInfo<'tcx>>>,
pub sync: FxHashMap<Size, Box<dyn Any>>,
}
Expand description
Extra per-allocation data
Fields§
§borrow_tracker: Option<AllocState>
Global state of the borrow tracker, if enabled.
data_race: Option<VClockAlloc>
Data race detection via the use of a vector-clock. This is only added if it is enabled.
weak_memory: Option<StoreBufferAlloc>
Weak memory emulation via the use of store buffers. This is only added if it is enabled.
backtrace: Option<Vec<FrameInfo<'tcx>>>
A backtrace to where this allocation was allocated. As this is recorded for leak reports, it only exists if this allocation is leakable. The backtrace is not pruned yet; that should be done before printing it.
sync: FxHashMap<Size, Box<dyn Any>>
Synchronization primitives like to attach extra data to particular addresses. We store that inside the relevant allocation, to ensure that everything is removed when the allocation is freed. This maps offsets to synchronization-primitive-specific data.
Implementations§
Source§impl AllocExtra<'_>
impl AllocExtra<'_>
pub fn borrow_tracker_sb(&self) -> &RefCell<Stacks>
pub fn borrow_tracker_sb_mut(&mut self) -> &mut RefCell<Stacks>
pub fn borrow_tracker_tb(&self) -> &RefCell<Tree>
Trait Implementations§
Source§impl<'tcx> Clone for AllocExtra<'tcx>
impl<'tcx> Clone for AllocExtra<'tcx>
Source§impl<'tcx> Debug for AllocExtra<'tcx>
impl<'tcx> Debug for AllocExtra<'tcx>
Source§impl VisitProvenance for AllocExtra<'_>
impl VisitProvenance for AllocExtra<'_>
fn visit_provenance(&self, visit: &mut VisitWith<'_>)
Auto Trait Implementations§
impl<'tcx> !Freeze for AllocExtra<'tcx>
impl<'tcx> !RefUnwindSafe for AllocExtra<'tcx>
impl<'tcx> !Send for AllocExtra<'tcx>
impl<'tcx> !Sync for AllocExtra<'tcx>
impl<'tcx> Unpin for AllocExtra<'tcx>
impl<'tcx> !UnwindSafe for AllocExtra<'tcx>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 152 bytes