]> sourceware.org Git - glibc.git/commitdiff
Hardcode locale archive page size as 4096.
authorJoseph Myers <joseph@codesourcery.com>
Thu, 3 Oct 2013 22:00:05 +0000 (22:00 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Thu, 3 Oct 2013 22:00:05 +0000 (22:00 +0000)
ChangeLog
locale/programs/locarchive.c

index a038c92d3e7900b20965698b951d08fd3e4f64bd..1daa62ffbca940638118b47301412f1d9e63cd56 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2013-10-03  Joseph Myers  <joseph@codesourcery.com>
 
+       * 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.
index 13dba0fb266a4a2b926ba2fac235924304a2c825..e2a30b5682aa7ab638bb6ecaa530f34c933deeca 100644 (file)
@@ -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
+     <https://sourceware.org/glibc/wiki/Development_Todo/Master#Locale_archive_alignment>
+     for more discussion.  */
+  const size_t pagesz = 4096;
   int small_mask;
 
   head = ah->addr;
This page took 0.115867 seconds and 5 git commands to generate.