pub struct AllocExtra<'tcx> {
pub borrow_tracker: Option<AllocState>,
pub data_race: AllocDataRaceHandler,
pub backtrace: Option<Vec<FrameInfo<'tcx>>>,
pub meta_objs: RangeObjectMap<Box<dyn MetaObj>>,
}Expand description
Extra per-allocation data
Fields§
§borrow_tracker: Option<AllocState>Global state of the borrow tracker, if enabled.
data_race: AllocDataRaceHandlerExtra state for data race detection.
Invariant: The enum variant must match the enum variant in the data_race field on MiriMachine
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.
meta_objs: RangeObjectMap<Box<dyn MetaObj>>Some shims implement APIs that manipulate opaque data stored in memory, or that attach extra data to particular memory locations. This is where we store that 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>
Source§impl<'tcx> AllocExtra<'tcx>
impl<'tcx> AllocExtra<'tcx>
Sourcefn get_meta<T: MetaObj>(&self, offset: Size) -> Option<&T>
fn get_meta<T: MetaObj>(&self, offset: Size) -> Option<&T>
Get the meta object that starts at the given offset.
Sourcefn get_meta_mut<T: MetaObj>(&mut self, offset: Size) -> Option<&mut T>
fn get_meta_mut<T: MetaObj>(&mut self, offset: Size) -> Option<&mut T>
Get the meta object that starts at the given offset.
Sourcefn insert_meta(&mut self, range: AllocRange, obj: Box<dyn MetaObj>)
fn insert_meta(&mut self, range: AllocRange, obj: Box<dyn MetaObj>)
Insert a new meta object covering the given range. Any other objects that exist in that range are removed.
fn remove_meta(&mut self, range: AllocRange) -> Option<Box<dyn MetaObj>>
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> !DynSend for AllocExtra<'tcx>
impl<'tcx> !DynSync for AllocExtra<'tcx>
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> !UnwindSafe for AllocExtra<'tcx>
impl<'tcx> Forget for AllocExtra<'tcx>
impl<'tcx> Move for AllocExtra<'tcx>
impl<'tcx> Unpin for AllocExtra<'tcx>
impl<'tcx> UnsafeUnpin 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: 136 bytes