Handbook
Glossary
prepare-mapped-file ( path quot -- mapped-file )
Vocabulary
io
.
mmap
.
private
Inputs
path
an
object
quot
an
object
Outputs
mapped-file
an
object
Definition
USING:
accessors
destructors
io.backend
io.files.info
io.mmap
kernel
math
;
IN:
io.mmap.private
::
prepare-mapped-file
( path quot -- mapped-file )
path
normalize-path
:>
path' path'
file-info
size>>
:>
length length 0
<=
[
length
bad-mmap-size
]
when
path' length quot
call
:>
( address handle )
mapped-file
new-disposable
address
>>address
handle
>>handle
length
>>length
;
inline