[PATCH 2/2 v4] [BZ #10283] localedef: align fixed maps to SHMLBA

Roland McGrath roland@hack.frob.com
Mon Jun 3 19:14:00 GMT 2013


> --- /dev/null
> +++ b/include/libc-mmap.h

We generally use sysdeps/generic/ for a file intended to have sysdeps variants.

> +/* Using MAP_FIXED with mmap() sometimes requires larger alignment.  */

Don't use "function()" in comments.  The () is not part of the name.

> +#include <sys/shm.h>
> +#define MAP_FIXED_ALIGNMENT SHMLBA

This is the Linux-specific definition.  The generic file should just use
page size, or perhaps the macro should be defined such that the code (or at
least the compiler) can tell statically that there is no need for
additional operations at all when the requirement is no larger than page
size.



More information about the Libc-alpha mailing list