# Compilation: make create\(\) take an arena allocator · gitcafe/zig

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

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

Visibility: public

Requested revision: e22102dfc6356a16e83341d0cd0526762c696ad6

Requested commit: e22102dfc6356a16e83341d0cd0526762c696ad6

Commit: e22102dfc6356a16e83341d0cd0526762c696ad6

Tree: 73751b59c4c93c30dced895f5bb9f4a84f5fcd8a

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
Compilation: make create() take an arena allocator

Instead of making its own inside create. 10 out of 10 calls to create()
had already an arena in scope, so this commit means that 10 instances of
Compilation now reuse an existing arena with the same lifetime rather
than creating a redundant one.

In other words, this very slightly optimizes initialization of the
frontend in terms of memory allocation.

```

## Parents

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

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