mirror of
https://github.com/mirage/qubes-mirage-firewall.git
synced 2024-10-01 01:05:39 -04:00
use the new quick_stat+trim from mirage-xen 8.0.0
This commit is contained in:
parent
7718c95f20
commit
68ab4f37c1
@ -30,7 +30,7 @@ let main =
|
|||||||
package "mirage-qubes" ~min:"0.9.1";
|
package "mirage-qubes" ~min:"0.9.1";
|
||||||
package "mirage-nat" ~min:"2.2.1";
|
package "mirage-nat" ~min:"2.2.1";
|
||||||
package "mirage-logs";
|
package "mirage-logs";
|
||||||
package "mirage-xen" ~min:"7.0.0";
|
package "mirage-xen" ~min:"8.0.0";
|
||||||
package ~min:"6.1.0" "dns-client";
|
package ~min:"6.1.0" "dns-client";
|
||||||
package "pf-qubes";
|
package "pf-qubes";
|
||||||
]
|
]
|
||||||
|
@ -43,11 +43,12 @@ let init () =
|
|||||||
|
|
||||||
let status () =
|
let status () =
|
||||||
let stats = Xen_os.Memory.quick_stat () in
|
let stats = Xen_os.Memory.quick_stat () in
|
||||||
if fraction_free stats > 0.1 then `Ok
|
if fraction_free stats > 0.4 then `Ok
|
||||||
else (
|
else (
|
||||||
Gc.full_major ();
|
Gc.full_major ();
|
||||||
|
Xen_os.Memory.trim ();
|
||||||
let stats = Xen_os.Memory.quick_stat () in
|
let stats = Xen_os.Memory.quick_stat () in
|
||||||
report_mem_usage stats;
|
report_mem_usage stats;
|
||||||
if fraction_free stats < 0.1 then `Memory_critical
|
if fraction_free stats < 0.4 then `Memory_critical
|
||||||
else `Ok
|
else `Ok
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user