Intitialise CodeSection with just the right capacity

This commit is contained in:
Brian Carroll 2021-11-08 14:59:41 +00:00
parent 7fb09f5768
commit 5bfc0093ec
2 changed files with 3 additions and 7 deletions

View file

@ -92,7 +92,9 @@ impl<'a> WasmBackend<'a> {
export: ExportSection { entries: exports },
start: (),
element: (),
code: CodeSection::new(arena),
code: CodeSection {
code_builders: Vec::with_capacity_in(num_procs, arena),
},
data: DataSection {
segments: bumpalo::vec![in arena; const_segment],
},