Simplify allocation creation
This commit is contained in:
parent
dc1c6c3a25
commit
43b55cf893
1 changed files with 1 additions and 2 deletions
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue