# Allocator.free: document zero-length behavior · gitcafe/zig

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

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

Visibility: public

Requested revision: e2f24a2d7096e4a28ba74513ed9473da0b7fb372

Requested commit: e2f24a2d7096e4a28ba74513ed9473da0b7fb372

Commit: e2f24a2d7096e4a28ba74513ed9473da0b7fb372

Tree: 0a1578713fd639963679874a900948649730a9d8

Author: Ilia Choly

Committer: Andrew Kelley

## Message

```
Allocator.free: document zero-length behavior

It wasn't immediately clear from the implementation whether passing
zero-length memory to free() was undefined behavior or intentionally
supported. Since ArrayList and other core data structures rely on
this behavior working correctly, this should be explicitly documented
as part of the public API contract.

```

## Parents

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

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