package proc-smaps

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type value = Stdint.uint64
module Fields : sig ... end
type t
val get_address : t -> value * value
val get_perms : t -> int

Return an integer in the range 0..31, where each bits represents rwxsp

val get_offset : t -> value
val get_inode : t -> int
val get_pathname : t -> string
val get_size_exn : t -> Fields.key -> value

Get the size associated with the given key

val get_size : t -> Fields.key -> value option
val pp_perms : Stdlib.Format.formatter -> int -> unit
val pp_mapping : Stdlib.Format.formatter -> t -> unit
val pp_mappings : Stdlib.Format.formatter -> t list -> unit
val get_smaps : int -> (t list, string) Stdlib.result Lwt.t

Read and parse /proc/<pid>/smaps

val get_self_smaps : unit -> (t list, string) Stdlib.result Lwt.t

Read and parse /proc/self/smaps

val sum_rss : t list -> value

Summalize RSS of all ts

val sum_shared_rss : t list -> value

Summalize RSS of shared ts