pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
// Provided methods
fn malloc_align(&self, size: u64) -> Align { ... }
fn emulate_allocator(
&mut self,
default: impl FnOnce(&mut MiriInterpCx<'tcx>) -> InterpResult<'tcx>,
) -> InterpResult<'tcx, EmulateItemResult> { ... }
fn malloc(
&mut self,
size: u64,
zero_init: bool,
) -> InterpResult<'tcx, Pointer> { ... }
fn posix_memalign(
&mut self,
memptr: &OpTy<'tcx>,
align: &OpTy<'tcx>,
size: &OpTy<'tcx>,
) -> InterpResult<'tcx, Scalar> { ... }
fn free(&mut self, ptr: Pointer) -> InterpResult<'tcx> { ... }
fn realloc(
&mut self,
old_ptr: Pointer,
new_size: u64,
) -> InterpResult<'tcx, Pointer> { ... }
fn aligned_alloc(
&mut self,
align: &OpTy<'tcx>,
size: &OpTy<'tcx>,
) -> InterpResult<'tcx, Pointer> { ... }
}
Provided Methods§
Sourcefn malloc_align(&self, size: u64) -> Align
fn malloc_align(&self, size: u64) -> Align
Returns the alignment that malloc
would guarantee for requests of the given size.
Sourcefn emulate_allocator(
&mut self,
default: impl FnOnce(&mut MiriInterpCx<'tcx>) -> InterpResult<'tcx>,
) -> InterpResult<'tcx, EmulateItemResult>
fn emulate_allocator( &mut self, default: impl FnOnce(&mut MiriInterpCx<'tcx>) -> InterpResult<'tcx>, ) -> InterpResult<'tcx, EmulateItemResult>
Emulates calling the internal _rust* allocator functions
fn malloc(&mut self, size: u64, zero_init: bool) -> InterpResult<'tcx, Pointer>
fn posix_memalign( &mut self, memptr: &OpTy<'tcx>, align: &OpTy<'tcx>, size: &OpTy<'tcx>, ) -> InterpResult<'tcx, Scalar>
fn free(&mut self, ptr: Pointer) -> InterpResult<'tcx>
fn realloc( &mut self, old_ptr: Pointer, new_size: u64, ) -> InterpResult<'tcx, Pointer>
fn aligned_alloc( &mut self, align: &OpTy<'tcx>, size: &OpTy<'tcx>, ) -> InterpResult<'tcx, Pointer>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.