This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: locale-archive optimizing for the primary locale


On Wed, Aug 14, 2002 at 03:02:30AM -0400, Roland McGrath wrote:
> Using an arbitrary size liable to be large enough (the largest
> locale now is not much over one megabyte) has the added benefit
> that we could skip the read and just do the mmap after the stat.
> That only loses in the error case of an archive with a bad header.
> I don't know what the cost of the read is, but every bit helps.
> I certainly think 2MB of address space is reasonable to give,
> and on a tightly-configured system one could install an archive
> containing only the primary locale and then the whole file would
> be only marginally larger than the data itself and no more AS than
> that consumed.

I think just mmap max (2MB, locale_archive.st_size) instead of read
would be the best (and fastest) solution.
If somebody cannot sacrifice 2MB, he can always LOCPATH=/usr/lib/locale
for the memory hungry application.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]