MLton 20051202

MLtonRlimit

Home Index

    signature MLTON_RLIMIT =
       sig
          type rlim = word
          type t

          val coreFileSize: t        (* CORE    max core file size *)
          val cpuTime: t             (* CPU     CPU time in seconds *)
          val dataSize: t            (* DATA    max data size *)
          val fileSize: t            (* FSIZE   Maximum filesize *)
          val get: t -> {hard: rlim, soft: rlim}
          val infinity: rlim
          val lockedInMemorySize: t  (* MEMLOCK max locked address space *)
          val numFiles: t            (* NOFILE  max number of open files *)
          val numProcesses: t        (* NPROC   max number of processes *)
          val residentSetSize: t     (* RSS     max resident set size *)
          val set: t * {hard: rlim, soft: rlim} -> unit
          val stackSize: t           (* STACK   max stack size *)
          val virtualMemorySize: t   (* AS      virtual memory limit *)
       end

`MLton.Rlimit` provides a wrapper around the C `getrlimit` and `setrlimit` functions.

- `type rlim`

the type of resource limits.

- `type t`

the types of resources that can be inspected and modified.

- `get r`

returns the current hard and soft limits for resource `r`. May raise `OS.SysErr`.

- `infinity`

indicates that a resource is unlimited.

- `set (r, {hard, soft})`

sets the hard and soft limits for resource `r`. May raise `OS.SysErr`.

Last edited on 2005-12-01 22:54:25 by StephenWeeks.