Memory-mapped files


The io.mmap vocabulary implements support for memory-mapped files.
<mapped-file> ( path -- mmap )


Memory-mapped files are disposable and can be closed with dispose or with-disposal.

Utility combinators which wrap the above:
with-mapped-file ( path quot -- )

with-mapped-file-reader ( path quot -- )

with-mapped-array ( path c-type quot -- )

with-mapped-array-reader ( path c-type quot -- )


Instances of mapped-file don't support any interesting operations in themselves. There are two facilities for accessing their contents:
Working with memory-mapped data
Memory-mapped file examples