Module rustc_middle::mir::interpret::allocation
source · [−]Expand description
The virtual memory representation of the MIR interpreter.
Structs
The information that makes up a memory access: offset and size.
This type represents an Allocation in the Miri/CTFE core engine.
A partial, owned list of provenance to transfer into another allocation.
Interned types generally have an
Outer
type and an Inner
type, where
Outer
is a newtype around Interned<Inner>
, and all the operations are
done on Outer
, because all occurrences are interned. E.g. Ty
is an
outer type and TyS
is its inner type.Yields
InitChunk
s. See InitMask::range_as_init_chunks
.A bitmask where each bit refers to the byte with the same index. If the bit is
true
, the byte
is initialized. If it is false
the byte is uninitialized.Run-length encoding of the uninit mask.
Used to copy parts of a mask multiple times to another allocation.
Stores the provenance information of pointers stored in memory.
Enums
We have our own error type that does not know about the
AllocId
; that information
is added when converting to InterpError
.A contiguous chunk of initialized or uninitialized memory.
Constants
This is the maximum size we will hash at a time, when interning an
Allocation
and its
InitMask
. Note, we hash that amount of bytes twice: at the start, and at the end of a buffer.
Used when these two structures are large: we only partially hash the larger fields in that
situation. See the comment at the top of their respective Hash
impl for more details.This is the maximum size (in bytes) for which a buffer will be fully hashed, when interning.
Otherwise, it will be partially hashed in 2 slices, requiring at least 2
MAX_BYTES_TO_HASH
bytes.Functions
Free-starting constructor for less syntactic overhead.