Re: mmap investigations
On Thu, Nov 13, 2008 at 08:39:18AM -0800, Daniel Burrows <dburrows@debian.org> was heard to say:
> On Sun, Nov 02, 2008 at 06:10:19PM +0200, "Eugene V. Lyubimkin" <jackyf.devel@gmail.com> was heard to say:
> > These investigations incited me to wonder if we... can simply do mmap(2GiB -1) amount of
> > memory, without any troubles?!
>
> Not on a 32-bit system you can't -- there's nowhere to put all the mappings.
Ah, I forgot that Linux has a 3GB address space for processes. I
still wouldn't recommend it, though; you're eating 2/3 of the
process's address space when you might not even need it.
If you're going to spend time on fixing how apt accesses its files,
I personally would suggest eliminating the use of mmap altogether, or
maybe seeing if you can mmap just the chunk you need at the time you
need it.
Daniel
Reply to: