# link: accept the update arena in flush · gitcafe/zig

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

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

Visibility: public

Requested revision: d5c1e7f7b1381036f7d98c1944607cb0e1c0d4da

Requested commit: d5c1e7f7b1381036f7d98c1944607cb0e1c0d4da

Commit: d5c1e7f7b1381036f7d98c1944607cb0e1c0d4da

Tree: f78506c79713b855ed8f23426ce78e0e292e13ee

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
link: accept the update arena in flush

This branch introduced an arena allocator for temporary allocations in
Compilation.update. Almost every implementation of flush() inside the
linker code was already creating a local arena that had the lifetime of
the function call. This commit passes the update arena so that all those
local ones can be deleted, resulting in slightly more efficient memory
usage with every compilation update.

While at it, this commit also removes the Compilation parameter from the
linker flush function API since a reference to the Compilation is now
already stored in `link.File`.

```

## Parents

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

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