This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [PATCH 2/2] manual/memory.texi: Document aligned_alloc.


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


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