Simplify allocation creation

This commit is contained in:
Smitty 2021-06-18 15:17:13 -04:00
parent dc1c6c3a25
commit 43b55cf893

View file

@ -130,9 +130,8 @@ impl<Tag> Allocation<Tag> {
InterpError::ResourceExhaustion(ResourceExhaustionInfo::MemoryExhausted)
})?;
bytes.resize(size.bytes_usize(), 0);
bytes.fill(0);
Ok(Allocation {
bytes: bytes,
bytes,
relocations: Relocations::new(),
init_mask: InitMask::new(size, false),
align,