# Implement a fallback mechanism for posix_memalign · gitcafe/zig

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

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

Visibility: public

Requested revision: 53433cdea2cee73caea52a6baa10dc7bc7f6da4d

Requested commit: 53433cdea2cee73caea52a6baa10dc7bc7f6da4d

Commit: 53433cdea2cee73caea52a6baa10dc7bc7f6da4d

Tree: be054df879f9fd491f0a2b9fc87f1af3ccff9d29

Author: LemonBoy

Committer: LemonBoy

## Message

```
Implement a fallback mechanism for posix_memalign

Do the alignment dance by ourselves whenever posix_memalign is not
available.
Don't try to use malloc as it has too many edge cases, figuring out
whether a block of memory is manually aligned by the mechanism above or
is directly coming from malloc becomes too hard to be valuable.

```

## Parents

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

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