qubes-mirage-firewall/memory_pressure.mli

13 lines
586 B
OCaml
Raw Normal View History

2015-12-30 04:52:24 -05:00
(* Copyright (C) 2015, Thomas Leonard <thomas.leonard@unikernel.com>
See the README file for details. *)
2016-01-02 10:59:59 -05:00
val init : unit -> unit
(** Write current memory usage information to XenStore. *)
2015-12-30 04:52:24 -05:00
val status : unit -> [ `Ok | `Memory_critical ]
(** Check the memory situation. If we're running low, do a GC (work-around for
http://caml.inria.fr/mantis/view.php?id=7100 and OCaml GC needing to malloc
extra space to run finalisers). Returns [`Memory_critical] if memory is
2016-01-02 10:59:59 -05:00
still low - caller should take action to reduce memory use.
After GC, updates meminfo in XenStore. *)