]> Kevux Git Server - fll/commit
Update: Use C11's aligned_alloc() by default, but keep posix_memalign() via macro...
authorKevin Day <thekevinday@gmail.com>
Sun, 12 Dec 2021 05:50:23 +0000 (23:50 -0600)
committerKevin Day <thekevinday@gmail.com>
Sun, 12 Dec 2021 05:50:23 +0000 (23:50 -0600)
commitde4615ea5e4ec8210ca6b7bfc4006ac173156f2e
tree722abbf0c68126fbc6aa0b4022c8623377446326
parentcd22361881b9fb82693c5ada91b03ad32d3494d9
Update: Use C11's aligned_alloc() by default, but keep posix_memalign() via macro _f_memory_USE_posix_memalign_.

The C11 standard introduced aligned_alloc() making it better practice than posix_memalign().
In case the compiler being used doesn't have aligned_alloc() or the user compiling just wants to posix_memalign() this behavior is preserved via _f_memory_USE_posix_memalign_ macro.

I didn't actually test this beyond confirming that it compiles.
I'm flying blind here.
level_0/f_memory/c/memory.c
level_0/f_memory/c/memory.h
level_0/f_memory/data/build/defines