https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94158

--- Comment #7 from Parker Thompson <par...@cyber-itl.org> ---
(In reply to Jakub Jelinek from comment #6)
> GCC assumes pointers returned by malloc are at least MALLOC_ABI_ALIGNMENT
> bytes aligned.  That is because:
> "The pointer returned if the allocation succeeds is suitably aligned so that
> it may be assigned to a pointer to any type of object and then used to
> access such an object or an array of such objects in the space allocated
> (until the space is explicitly deallocated)."
> glibc normally guarantees 2 * sizeof (void *) alignment, GCC by default
> assumes just a wordsize alignment.
> So, if your malloc replacement doesn't provide such alignment, it is
> incorrect.

Ahhh I see, I apologize for my misunderstanding.

Reply via email to