Memory-mapped files


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


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

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

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

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

Image
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:
Image Working with memory-mapped data
Image Memory-mapped file examples