Expand description
The virtual memory representation of the MIR interpreter.
Re-exports§
pub use init_mask::InitChunk;
pub use init_mask::InitChunkIter;
Modules§
- init_
mask 🔒 - provenance_
map 🔒 - Store the provenance for each byte in the range, with a more efficient representation for the common case where PTR_SIZE consecutive bytes have the same provenance.
Structs§
- Alloc
Range - The information that makes up a memory access: offset and size.
- Allocation
- This type represents an Allocation in the Miri/CTFE core engine.
- Const
Allocation - Interned types generally have an
Outer
type and anInner
type, whereOuter
is a newtype aroundInterned<Inner>
, and all the operations are done onOuter
, because all occurrences are interned. E.g.Ty
is an outer type andTyKind
is its inner type.
Enums§
- Alloc
Error - We have our own error type that does not know about the
AllocId
; that information is added when converting toInterpError
. - Alloc
Init - Whether a new allocation should be initialized with zero-bytes.
Constants§
- MAX_
BYTES_ 🔒TO_ HASH - This is the maximum size we will hash at a time, when interning an
Allocation
and itsInitMask
. 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 respectiveHash
impl for more details. - MAX_
HASHED_ 🔒BUFFER_ LEN - 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.
Traits§
- Alloc
Bytes - Functionality required for the bytes of an
Allocation
.
Functions§
- alloc_
range - Free-starting constructor for less syntactic overhead.