Streams 0.2.1 beta released
droundy at darcs.net
Wed Jul 12 08:51:26 EDT 2006
On Wed, Jul 12, 2006 at 03:07:41PM +0400, Bulat Ziganshin wrote:
> Using memory-mapped files provides slight speed improvement because it
> excludes the need to move data between OS buffer and application buffer.
> Moreover, this may scale better in multi-threading environments without
> need to implement special async I/O, although i don't checked this
There's also the potentially quite significant advantage that with
mmapped files you can open up files much larger than the physical
memory size. Or if you open smaller files, but the system begins to
swap, mmaped files don't have to be swapped to a swap file, which
makes things more efficient in general. In my opinion this is a much
more important reason to use mmap than avoiding a memory copy from
kernel space to user space.
More information about the Libraries