Should glibc provide a builtin C.UTF-8 locale?
Carlos O'Donell
carlos@redhat.com
Thu Feb 12 20:32:00 GMT 2015
On 02/12/2015 02:25 PM, keld@keldix.com wrote:
>> The difference with the uncompressed locale archive is that it's NOT
>> loaded into memory, it's mmapped, just like executables and shared
>> libraries are. This means that only the used parts are ever resident
>> in memory at all, they're discardable (subject to reloading later on
>> the next access) just like anything else in the filesystem cache, and
>> shared by all processes using glibc.
>
> I see. Are message catalogues also mmapped?
Yes, directly from disk.
glibc/catgets/open_catalog.c:
216 (struct catalog_obj *) __mmap (NULL, st.st_size, PROT_READ,
217 MAP_FILE|MAP_COPY, fd, 0);
There is only ever one copy of a catalog in memory for the entire
system, and it is mapped into any process that needs it.
Cheers,
Carlos.
More information about the Libc-alpha
mailing list