Dropping mmap from the virtual file system
Roland Illig
roland.illig at gmx.de
Sun Feb 27 22:24:27 UTC 2005
Roland Illig wrote:
>>> I would like to drop the mmap() and munmap() methods from the vfs code.
Leonard den Ottolander wrote:
>> Why?
Roland Illig wrote:
> To make the source code of mc smaller and better understandable. For the
> virtual file system, it nearly makes no sense to provide an mmap()
> method, as most of the filesystems would have to implement it using
> read() anyways.
>
> At least, no vfs other than localfs currently implements the mmap() calls.
>
> Another thing is that mmap() does not work reliably on FreeBSD when
> using it with files in /proc. The Midnight Commander crashes then with a
> SIGBUS error.
>
> There would be two methods less that a vfs implementor has to think about.
And here's the patch to do it. Note that mc is still using mmap(), but
not in the virtual file system. It does not lose any functionality, just
code size.
Roland
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: no-mmap.patch
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20050227/8738c987/attachment.ksh>
More information about the mc-devel
mailing list