Skip to main content

free_percent

Function free_percent 

Source
pub fn free_percent() -> Result<Percent>
Expand description

free as a share of total.

use sys_lib as sys;

// Shed load before the out-of-memory killer does.
if sys::mem::free_percent()?.value() < 5.0 { /* refuse new work */ }

ยงErrors

As total.