# improvements & fixes for general purpose allocator integration · gitcafe/zig

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

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

Visibility: public

Requested revision: 0347df82e8c821906ef0d07ec65fe4b3884c0212

Requested commit: 0347df82e8c821906ef0d07ec65fe4b3884c0212

Commit: 0347df82e8c821906ef0d07ec65fe4b3884c0212

Tree: 20076f52a0024e2252eac24683e39d3ee25d4d28

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
improvements & fixes for general purpose allocator integration

 * std.Mutex API is improved to not have init() deinit(). This API is
   designed to support static initialization and does not require any
   resource cleanup. This also happens to work around some kind of
   stage1 behavior that wasn't letting the new allocator mutex code
   get compiled.
 * the general purpose allocator now returns a bool from deinit()
   which tells if there were any leaks. This value is used by the test
   runner to fail the tests if there are any.
 * self-hosted compiler is updated to use the general purpose allocator
   when not linking against libc.

```

## Parents

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

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