* Paul Eggert: > On 7/21/20 8:51 AM, Florian Weimer wrote: >> The official aligned_alloc produces pointers compatible with free. >> This module cannot do that. > > I don't see why not, at least on platforms of interest to Gnulib. On > systems that provide no native way to do an aligned allocation, we > merely keep calling malloc with suitable arguments until we get a > pointer that is suitably aligned. We then free all the unsuitable > storage we allocated along the way, and return the good pointer.
I don't think it will work. Try to get an allocation of 4096 bytes with 4096 bytes alignment using glibc malloc this way. Thanks, Florian