<mapped-file> ( path -- mmap )
Memory-mapped files

Next:with-mapped-file ( path quot -- )


Vocabulary
io.mmap

Inputs
patha pathname string


Outputs
mmapa mapped-file


Generic word contract
Opens a file and maps its contents into memory. The length is permitted to exceed the length of the file on disk, in which case the remaining space is padded with zero bytes.

Notes
You must call dispose when you are finished working with the returned object, to reclaim resources. The with-mapped-file provides an abstraction which can close the mapped file for you.

Errors
Throws an error if a memory mapping could not be established.

Definition