Subject: Re: mmap (was Re: bin/10625: /usr/bin/cmp)
To: None <firstname.lastname@example.org>
From: Wolfgang Rupprecht <email@example.com>
Date: 07/28/2000 14:00:47
firstname.lastname@example.org (Greg A. Woods) writes:
> [ On , July 28, 2000 at 13:12:54 (-0700), Wolfgang Rupprecht wrote: ]
> > Subject: mmap (was Re: bin/10625: /usr/bin/cmp)
> > Currently mmap() doesn't know how to extend a file. So even if one
> > mmaps in extra space at the end of a file, one gets a SIGBUS if one
> > tries to write to it.
> Perhaps mmap() shouldn't be used to write to files. Indeed this is yet
> another reason why use of mmap() should normally be hidden away in a
> more generic library interface where its idiosyncracies can be carefully
> coded around once.
My reason for using mmap is because I'm hacking (up to) 600Meg files.
There is no fscking way I'm going to run all that crap through the
buffer cache if I don't need to.
Hiding mmap() in a library will make the programmer interface look
nicer, but if the underlying foundation doesn't work well I'm still
left with needless inefficiencies. Unmapping, seeking, writing a byte
and remapping is a silly waste of CPU. (And I'm not even convinced
that they buffer-cache and the mmaped data are ever guaranteed to be
Wolfgang Rupprecht <email@example.com>
DGPS signals via the Internet http://www.wsrcc.com/wolfgang/gps/dgps-ip.html