# std: Fix metadata corruption in HeapAllocator · gitcafe/zig

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

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

Visibility: public

Requested revision: 58ee5f4e61cd9b7a9ba65798e2214efa3753a733

Requested commit: 58ee5f4e61cd9b7a9ba65798e2214efa3753a733

Commit: 58ee5f4e61cd9b7a9ba65798e2214efa3753a733

Tree: 783d36ae80c34a91c50d1e5f7768e6116cd6583b

Author: LemonBoy

Committer: Andrew Kelley

## Message

```
std: Fix metadata corruption in HeapAllocator

HeapAllocator stores the pointer returned by HeapAlloc right after the
data block and, after the recent allocator refactoring, the space for
this pointer was not taken into account in the calculation of the final
block size.

Fixes #5830

```

## Parents

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

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