# std: the failing allocator didn't actually count allocations · gitcafe/zig

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

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

Visibility: public

Requested revision: 3d93c89fc55a428171bbfa779fb604801d84421d

Requested commit: 3d93c89fc55a428171bbfa779fb604801d84421d

Commit: 3d93c89fc55a428171bbfa779fb604801d84421d

Tree: 3f01ec200b694e8facc4a27abc17998f3819f50a

Author: daurnimator

Committer: Andrew Kelley

## Message

```
std: the failing allocator didn't actually count allocations

Add a field '.allocations' to actually track the number of allocations.

Additionally, only increment '.deallocations' when memory is freed

```

## Parents

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

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