From: Joseph Myers Date: Thu, 3 Oct 2013 22:00:05 +0000 (+0000) Subject: Hardcode locale archive page size as 4096. X-Git-Tag: glibc-2.19~702 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=d3d237560b858b3c07973a5261cd6903fe52909c;p=glibc.git Hardcode locale archive page size as 4096. --- diff --git a/ChangeLog b/ChangeLog index a038c92d3e..1daa62ffbc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2013-10-03 Joseph Myers + * locale/programs/locarchive.c (add_locale): Use constant 4096 for + page size instead of calling getpagesize. + * locale/localeinfo.h (LOCFILE_ALIGN): New macro. (LOCFILE_ALIGN_MASK): Likewise. (LOCFILE_ALIGN_UP): Likewise. diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c index 13dba0fb26..e2a30b5682 100644 --- a/locale/programs/locarchive.c +++ b/locale/programs/locarchive.c @@ -838,7 +838,12 @@ add_locale (struct locarhandle *ah, off64_t lastoffset; char *ptr; struct locale_category_data *size_order[__LC_LAST]; - const size_t pagesz = getpagesize (); + /* Page size alignment is a minor optimization for locality; use a + common value here rather than making the localedef output depend + on the page size of the system on which localedef is run. See + + for more discussion. */ + const size_t pagesz = 4096; int small_mask; head = ah->addr;