[repacker] Pre-alloc vertices

This commit is contained in:
Behdad Esfahbod 2022-05-18 16:25:03 -06:00
parent 39a424caf0
commit bff8248a9d
1 changed files with 2 additions and 0 deletions

View File

@ -148,6 +148,8 @@ struct graph_t
{
num_roots_for_space_.push (1);
bool removed_nil = false;
vertices_.alloc (objects.length);
vertices_scratch_.alloc (objects.length);
for (unsigned i = 0; i < objects.length; i++)
{
// TODO(grieger): check all links point to valid objects.