package proc-smaps

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type value = Stdint.uint64
module Field : sig ... end
type t = {
  1. address : value * value;
  2. perms : int;
  3. offset : value;
  4. inode : int;
  5. pathname : string;
  6. size_fields : value Field.t;
}
val size : string
val kernel_page_size : string
val mmu_page_size : string
val rss : string
val pss : string
val shared_clean : string
val shared_dirty : string
val private_clean : string
val private_dirty : string
val referenced : string
val anonymous : string
val lazy_free : string
val anon_huge_pages : string
val shmem_pmd_mapped : string
val file_pmd_mapped : string
val shared_hugetlb : string
val private_hugetlb : string
val swap : string
val swap_pss : string
val locked : string
val get_address : t -> value * value
val get_perms : t -> int

Return an integer in the range 0, 32), 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 -> string -> value
val get_size : t -> string -> value option
val pp_perms : Format.formatter -> int -> unit
val pp_mapping : Format.formatter -> t -> unit
val pp_mappings : Format.formatter -> t list -> unit
val get_smaps : int -> (t list, string) result Lwt.t

Read and parse /proc/self/smaps

val get_self_smaps : unit -> (t list, string) 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

OCaml

Innovation. Community. Security.