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

Prev:with-mapped-file-reader ( path quot -- )
Next:with-mapped-array-reader ( path c-type quot -- )


Vocabulary
io.mmap

Inputs
patha pathname string
c-typea c-type
quota quotation


Outputs
None

Word description
Memory-maps a file for reading and writing, wrapping it in a specialized array with the given element type. The mapped file is disposed of when the quotation returns, or if an error is thrown.

Examples
USING: alien.c-types io.mmap prettyprint specialized-arrays ; SPECIALIZED-ARRAY: uint resource:LICENSE.txt" uint [ [ . ] each ] with-mapped-array


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

Definition