document the fields of Allocation

This commit is contained in:
Oliver Schneider 2016-09-09 17:11:43 +02:00 committed by Oliver Schneider
parent 78bef956c9
commit 0e58c2a31b
No known key found for this signature in database
GPG Key ID: 1D5CB4FC597C3004

View File

@ -26,9 +26,15 @@ impl fmt::Display for AllocId {
#[derive(Debug)]
pub struct Allocation {
/// The actual bytes of the allocation.
/// Note that the bytes of a pointer represent the offset of the pointer
pub bytes: Vec<u8>,
/// Maps from byte addresses to allocations.
/// Only the first byte of a pointer is inserted into the map.
pub relocations: BTreeMap<usize, AllocId>,
/// Denotes undefined memory. Reading from undefined memory is forbidden in miri
pub undef_mask: UndefMask,
/// The alignment of the allocation to detect unaligned reads.
pub align: usize,
}