Module rustc_middle::mir::interpret::allocation::init_mask
source · Structs
- Yields
InitChunks. SeeInitMask::range_as_init_chunks. - Run-length encoding of the uninit mask. Used to copy parts of a mask multiple times to another allocation.
- A bitmask where each bit refers to the byte with the same index. If the bit is
true, the byte is initialized. If it isfalsethe byte is uninitialized. The actual bits are only materialized when needed, and we try to keep this data lazy as long as possible. Currently, if all the blocks have the same value, then the mask represents either a fully initialized or fully uninitialized const allocation, so we can only store that single value. - The actual materialized blocks of the bitmask, when we can’t keep the
InitMasklazy.
Enums
- A contiguous chunk of initialized or uninitialized memory.
Constants
Functions
- A fast implementation of
find_bit, which skips over an entire block at a time if it’s all 0s (resp. 1s), and finds the first 1 (resp. 0) bit inside a block usingtrailing_zerosinstead of a loop. - Search one block, returning the index of the first bit equal to
is_init.
Type Definitions
- Block 🔒