package plebeia

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Mmap.Arch64Source

Sourcemodule Buffer : sig ... end

Memory buffer

Sourcetype t

Type of mmap'ed file

Sourceval make : Unix.file_descr -> pos:int -> shared:bool -> int -> t

make fd ~pos ~shared len maps the region of the file specified by fd, pos, and len to an mmap. If shared=true, the modifications to t is shared with other processes and written back to the file.

Sourceval null : t

Build a dummy empty mmap. get_buffer always fails.

Sourceval is_null : t -> bool
Sourceval msync : t -> unit

Call msync(2) to flush the changes to the mapped file

Sourceval msync2 : t -> off:int -> len:int -> unit
Sourceval msync_lwt : t -> unit Lwt.t
Sourceval msync2_lwt : t -> off:int -> len:int -> unit Lwt.t
Sourceval madvise_random : t -> unit
Sourceval get_buffer : off:int -> len:int -> t -> Buffer.t

Get a buffer to read/write the specified region of the mmap

Sourceval len : t -> int

The length of the mmap in bytes

Sourceval get_char : t -> int -> char
Sourceval init : int -> (int -> char) -> t

On memory map

OCaml

Innovation. Community. Security.