We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
C11 added a new memory management function called aligned_alloc.
aligned_alloc
The lack of this function may cause errors such as zlib-ng/zlib-ng#1809
Keep in mind that glibc provides more function too. A full list is available at: https://www.gnu.org/software/libc/manual/html_node/Replacing-malloc.html#Replacing-malloc
The text was updated successfully, but these errors were encountered:
The fix is actually very simple, and here it is as a patch:
diff -rup ElectricFence-2.2.2/efence.c ElectricFence-2.2.2-build/efence.c --- ElectricFence-2.2.2/efence.c 2024-11-15 10:41:40.989554003 +0200 +++ ElectricFence-2.2.2-build/efence.c 2024-11-15 10:42:43.287556617 +0200 @@ -968,6 +968,12 @@ calloc(size_t nelem, size_t elsize) return allocation; } +extern C_LINKAGE void * +aligned_alloc(size_t alignment, size_t userSize) +{ + return memalign(alignment, userSize); +} + /* * This will catch more bugs if you remove the page alignment, but it * will break some software.
Sorry, something went wrong.
No branches or pull requests
C11 added a new memory management function called
aligned_alloc
.The lack of this function may cause errors such as zlib-ng/zlib-ng#1809
Keep in mind that glibc provides more function too. A full list is available at:
https://www.gnu.org/software/libc/manual/html_node/Replacing-malloc.html#Replacing-malloc
The text was updated successfully, but these errors were encountered: