Handbook
Glossary
prepare-mapped-file ( path quot -- mapped-file path' length )
Vocabulary
io
.
mmap
.
private
Inputs
path
an
object
quot
an
object
Outputs
mapped-file
an
object
path'
an
object
length
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' length )
[
[
normalize-path
]
[
file-info
size>>
]
bi
[
dup
0
<=
[
bad-mmap-size
]
[
2drop
]
if
]
[
nip
mapped-file
new-disposable
swap
>>length
]
]
dip
2tri
[
>>address
]
[
>>handle
]
bi*
;
inline