Module Imandrakit_io_setrlimit

type resource =
  1. | RLIMIT_CORE
    (*

    maximum size of a core file, in bytes

    *)
  2. | RLIMIT_CPU
    (*

    maximum amount of CPU time, in seconds, used by a process

    *)
  3. | RLIMIT_DATA
    (*

    maximum size of a data segment of the process, in bytes

    *)
  4. | RLIMIT_FSIZE
    (*

    maximum size of a file, in bytes, that may be created by a process

    *)
  5. | RLIMIT_NOFILE
    (*

    a number one greater than the maximum value that the system may assign to a newly-created descriptor

    *)
  6. | RLIMIT_STACK
    (*

    maximum size of the initial thread's stack, in bytes. This might clash with OCaml's stack management.

    *)
  7. | RLIMIT_AS
    (*

    maximum size of total available memory of the process, in bytes

    *)
module Raw : sig ... end
val set : resource -> int -> bool

set resource limit returns true if setting the limit succeeded

val set_exn : resource -> int -> unit

Like set, but propagates failures

  • raises Failure

    if it fails