This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Does malloc tell us anything about alignment modulo k?


> POSIX requires posix_memalign to be freeable by free() and I doubt anybody
> implements function posix_memalign which doesn't have POSIX semantics.
> In glibc, posix_memalign is a wrapper around memalign, so glibc memalign
> can be freed by free() too.

All of this is very specific to glibc and/or gnu/linux.

AFAIK, not many systems implement posix_memalign today: doing a man
posix_memalign on Solaris 9 or HP-UX 11.11 yields no answer for instance,
and these are recent OSes, I am not even mentioning older OSes (nor
Windows...)

FWIW, this is causing GNAT lots of troubles (that GCC's maximum alignment
is bigger than what malloc guarantees).

Arno


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]