availableBytes property

int availableBytes
final

Currently unused RAM plus RAM the OS could reclaim without swapping (e.g. macOS's inactive pages, Linux's MemAvailable) — a much more useful number than totalBytes for "how much can I safely claim right now", since most of totalBytes is normally already in use by the OS and other processes.

Implementation

final int availableBytes;