Re: large files and low memory
On Tue, 5 Oct 2010, Enrico Weigelt wrote:
Show 10 quoted lines
> * Shawn Pearce <spearce@spearce.org> wrote:
>
> > The mmap() isn't the problem. Its the allocation of a buffer that is
> > larger than the file in order to hold the result of deflating the file
> > before it gets written to disk.
> > When the file is bigger than physical memory, the kernel has to
> > page in parts of the file as well as swap in and out parts of
> > that allocated buffer to hold the deflated file.
>
> What are the access pattern of these memory areas ?
> Perhaps madvise() could help ?