# C backend: fix crash when number of Decls passes a threshold · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/1c93cf52d8b8acab469efe5d4457ed43d76bc6e5)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 1c93cf52d8b8acab469efe5d4457ed43d76bc6e5

Requested commit: 1c93cf52d8b8acab469efe5d4457ed43d76bc6e5

Commit: 1c93cf52d8b8acab469efe5d4457ed43d76bc6e5

Tree: 7f85f232fe39aeb3ab43d13dd29ecd70f9921d55

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
C backend: fix crash when number of Decls passes a threshold

The ensureUnusedCapacity did not reserve a big enough number. I changed
it to no longer guess the capacity because I saw that the number of
possible items was not determinable ahead of time and this can therefore
avoid allocating more memory than necessary.

```

## Parents

- [c59ee3157f5a7fb5c6110422ea8215601285ea28](https://git.cafe/gitcafe/zig/commit/c59ee3157f5a7fb5c6110422ea8215601285ea28?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/1c93cf52d8b8acab469efe5d4457ed43d76bc6e5?format=markdown)
