package core

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

Resource limits

Resource limits

module Limit : sig ... end
type limit = Limit.t =
  1. | Limit of int64
  2. | Infinity
val limit_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> limit
val sexp_of_limit : limit -> Ppx_sexp_conv_lib.Sexp.t
type t = {
  1. cur : limit;
    (*

    soft limit

    *)
  2. max : limit;
    (*

    hard limit (ceiling for soft limit)

    *)
}
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> t
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
type resource
val resource_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> resource
val sexp_of_resource : resource -> Ppx_sexp_conv_lib.Sexp.t
val core_file_size : resource
val cpu_seconds : resource
val data_segment : resource
val file_size : resource
val num_file_descriptors : resource
val stack : resource
val virtual_memory : resource Core_kernel.Or_error.t

See man pages for "getrlimit" and "setrlimit" for details.

val get : resource -> t
val set : resource -> t -> unit
OCaml

Innovation. Community. Security.