This is the mail archive of the
mailing list for the glibc project.
Re: Should glibc provide a builtin C.UTF-8 locale?
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: keld at keldix dot com, Rich Felker <dalias at libc dot org>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 12 Feb 2015 15:32:13 -0500
- Subject: Re: Should glibc provide a builtin C.UTF-8 locale?
- Authentication-results: sourceware.org; auth=none
- References: <54DB8243 dot 3050903 at redhat dot com> <20150211235304 dot GA20330 at www5 dot open-std dot org> <20150212023923 dot GP23507 at brightrain dot aerifal dot cx> <20150212063839 dot GA10787 at www5 dot open-std dot org> <20150212151509 dot GQ23507 at brightrain dot aerifal dot cx> <20150212192544 dot GA19724 at www5 dot open-std dot org>
On 02/12/2015 02:25 PM, email@example.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.
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.