package bigstring-unix

  1. Overview
  2. Docs
On This Page
  1. Memory-map
Legend:
Library
Module
Module type
Parameter
Class
Class type

Memory-map

val with_map_file : ?pos:int64 -> ?len:int -> ?mode:int -> ?flags:open_flag list -> ?shared:bool -> string -> (Bigstring.t -> 'a) -> 'a

with_map_file name f maps the file into memory, opening it, and call f with a slice pos.... pos+len of the bytes of the file where len is the length of the file if not provided. When f returns, the file is closed.

  • parameter pos

    offset in the file (default 0)

  • parameter shared

    if true, modifications are shared between processes that have mapped this file (requires the filedescr to be open in write mode).

  • parameter mode

    the mode for the file, if it's created

  • parameter flags

    opening flags (default rdonly) see Bigarray.Array1.map_file for more details

val map_file_descr : ?pos:int64 -> ?shared:bool -> Unix.file_descr -> int -> Bigstring.t

map_file_descr descr len is a lower-level access to an underlying file descriptor.

  • parameter shared

    if true, modifications are shared between processes that have mapped this file (requires the filedescr to be open in write mode). see Bigarray.Array1.map_file for more details

OCaml

Innovation. Community. Security.