EvalContextExt

Trait EvalContextExt 

Source
pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
    // Provided methods
    fn malloc_align(&self, size: u64) -> Align { ... }
    fn check_rust_alloc_request(
        &self,
        size: u64,
        align: u64,
    ) -> InterpResult<'tcx> { ... }
    fn rust_special_allocator_method(
        &mut self,
        method: SpecialAllocatorMethod,
        link_name: Symbol,
        abi: &FnAbi<'tcx, Ty<'tcx>>,
        args: &[OpTy<'tcx>],
        dest: &PlaceTy<'tcx>,
    ) -> InterpResult<'tcx> { ... }
    fn malloc(
        &mut self,
        size: u64,
        init: AllocInit,
    ) -> 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§

Source

fn malloc_align(&self, size: u64) -> Align

Returns the alignment that malloc would guarantee for requests of the given size.

Source

fn check_rust_alloc_request(&self, size: u64, align: u64) -> InterpResult<'tcx>

Check some basic requirements for this allocation request: non-zero size, power-of-two alignment.

Source

fn rust_special_allocator_method( &mut self, method: SpecialAllocatorMethod, link_name: Symbol, abi: &FnAbi<'tcx, Ty<'tcx>>, args: &[OpTy<'tcx>], dest: &PlaceTy<'tcx>, ) -> InterpResult<'tcx>

Source

fn malloc(&mut self, size: u64, init: AllocInit) -> InterpResult<'tcx, Pointer>

Source

fn posix_memalign( &mut self, memptr: &OpTy<'tcx>, align: &OpTy<'tcx>, size: &OpTy<'tcx>, ) -> InterpResult<'tcx, Scalar>

Source

fn free(&mut self, ptr: Pointer) -> InterpResult<'tcx>

Source

fn realloc( &mut self, old_ptr: Pointer, new_size: u64, ) -> InterpResult<'tcx, Pointer>

Source

fn aligned_alloc( &mut self, align: &OpTy<'tcx>, size: &OpTy<'tcx>, ) -> InterpResult<'tcx, Pointer>

Implementors§

Source§

impl<'tcx> EvalContextExt<'tcx> for MiriInterpCx<'tcx>