This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/2] manual/memory.texi: Document aligned_alloc.
- From: Rich Felker <dalias at aerifal dot cx>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: Will Newton <will dot newton at linaro dot org>, libc-alpha at sourceware dot org, Patch Tracking <patches at linaro dot org>
- Date: Wed, 6 Nov 2013 22:44:16 -0500
- Subject: Re: [PATCH 2/2] manual/memory.texi: Document aligned_alloc.
- Authentication-results: sourceware.org; auth=none
- References: <527A6F4E dot 4020006 at linaro dot org> <527A95D5 dot 2060604 at cs dot ucla dot edu>
On Wed, Nov 06, 2013 at 11:17:41AM -0800, Paul Eggert wrote:
> Looks pretty good. Some suggestions:
>
> > +This function was introduced in @w{ISO C11} and hence may have better
> > +portability to modern non-POSIX systems than @code{posix_memalign}.
>
> A similar note should be put in posix_memalign's documentation.
> Something like this, perhaps?
It would also be nice to mention the danger of posix_memalign's
interface -- the void **-based interface encourages aliasing
violations of the form:
char *p;
int err = posix_memalign((void **)&p, 16, n);
As such, it should be deprecated.
Rich