qubes-mirage-firewall/memory_pressure.mli

13 lines
586 B
OCaml
Raw Normal View History

2015-12-30 09:52:24 +00:00
(* Copyright (C) 2015, Thomas Leonard <thomas.leonard@unikernel.com>
See the README file for details. *)
2016-01-02 15:59:59 +00:00
val init : unit -> unit
(** Write current memory usage information to XenStore. *)
2015-12-30 09:52:24 +00: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 15:59:59 +00:00
still low - caller should take action to reduce memory use.
After GC, updates meminfo in XenStore. *)