pub fn available_bytes() -> Option<u64>Expand description
Bytes a new allocation can reasonably expect to get.
On macOS this counts free plus INACTIVE pages, because inactive
pages are reclaimable and counting only free ones understates what
is available by many gigabytes on a machine that has been up for a
while. On Linux it is MemAvailable, which the kernel computes for
exactly this question. None when the platform will not say, which
callers must treat as “unknown”, never as zero.