Subject: mmap (was Re: bin/10625: /usr/bin/cmp)
To: None <tech-userlevel@netbsd.org>
From: Wolfgang Rupprecht <wolfgang@wsrcc.com>
List: tech-userlevel
Date: 07/28/2000 13:12:54
Speaking of mmap(), how hard would it be to make mmap do something
more useful for file writes?
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.
One is left with such croks as extending the file through the buffer
pool by opening the file with the normal open() and seeking to some
ungodly position and writing a single byte. That leaves a holey file
which is mostly an accident waiting to happen. (Most tools will be
quite happy to fill in the hole for you, chewing up whatever free
space you thought you had on the disk.)
-wolfgang
--
Wolfgang Rupprecht <wolfgang+gnus@dailyplanet.wsrcc.com>
http://www.wsrcc.com/wolfgang/
DGPS signals via the Internet http://www.wsrcc.com/wolfgang/gps/dgps-ip.html