[PATCH] Fix loadarchive.c for 32-bit arches
Jakub Jelinek
jakub@redhat.com
Thu Aug 15 17:02:00 GMT 2002
Hi!
I've noticed on my 32-bit box libc mmaps the whole locale-archive while
it should mmap just 2MB...
2002-08-16 Jakub Jelinek <jakub@redhat.com>
* locale/programs/loadarchive.c (_nl_load_locale_from_archive): For
32-bit arches use MIN, not MAX.
--- libc/locale/programs/loadarchive.c.jj Thu Aug 15 18:18:41 2002
+++ libc/locale/programs/loadarchive.c Thu Aug 15 19:59:17 2002
@@ -206,7 +206,7 @@ _nl_load_locale_from_archive (int catego
just map the whole file and be sure everything is covered. */
mapsize = (sizeof (void *) > 4 ? archive_stat.st_size
- : MAX (archive_stat.st_size, ARCHIVE_MAPPING_WINDOW));
+ : MIN (archive_stat.st_size, ARCHIVE_MAPPING_WINDOW));
result = __mmap64 (NULL, mapsize, PROT_READ, MAP_SHARED, fd, 0);
if (result == MAP_FAILED)
Jakub
More information about the Libc-alpha
mailing list