# std.heap: remove \`raw_c_allocator\` · gitcafe/zig

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

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

Visibility: public

Requested revision: b5ff96b4d2091a29c07671e814fa937d2902e9b9

Requested commit: b5ff96b4d2091a29c07671e814fa937d2902e9b9

Commit: b5ff96b4d2091a29c07671e814fa937d2902e9b9

Tree: dfdc99e2fb0432bd8a5d3a940a8aa501a6a3d69a

Author: Matthew Lugg

Committer: mlugg

## Message

```
std.heap: remove `raw_c_allocator`

After https://codeberg.org/ziglang/zig/pulls/30103, `raw_c_allocator` is
redundant. It existed to avoid overhead when you could assert that all
of your `Allocator` usage was going to be compatible with the C `malloc`
API, but the standard `c_allocator` is now able to avoid that overhead
*in the case* that your usage is compatible (and use the less efficient
path in the rare case where it's not), so there's no need for the raw
version anymore. Leaving it in `std.heap` at this point seems like it
would just be a footgun.

```

## Parents

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

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