Simplify allocation creation
This commit is contained in:
@@ -130,9 +130,8 @@ impl<Tag> Allocation<Tag> {
|
|||||||
InterpError::ResourceExhaustion(ResourceExhaustionInfo::MemoryExhausted)
|
InterpError::ResourceExhaustion(ResourceExhaustionInfo::MemoryExhausted)
|
||||||
})?;
|
})?;
|
||||||
bytes.resize(size.bytes_usize(), 0);
|
bytes.resize(size.bytes_usize(), 0);
|
||||||
bytes.fill(0);
|
|
||||||
Ok(Allocation {
|
Ok(Allocation {
|
||||||
bytes: bytes,
|
bytes,
|
||||||
relocations: Relocations::new(),
|
relocations: Relocations::new(),
|
||||||
init_mask: InitMask::new(size, false),
|
init_mask: InitMask::new(size, false),
|
||||||
align,
|
align,
|
||||||
|
|||||||
Reference in New Issue
Block a user