<mapped-file-reader> ( path -- mmap )


Vocabulary
io.mmap

Inputs
patha pathname string


Outputs
mmapa mapped-file


Generic word contract
Opens a file for reading only 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