Available megabytes implied by a block of vm_stat output
Source: R/matching_memory.R
vm_stat_available_mb.RdInactive and speculative pages are reclaimed on demand, so they count as
available to an allocation in the same sense as Linux's MemAvailable; macOS
keeps almost nothing on the free list, so the free count alone understates
what a large matrix can actually obtain.
Arguments
- vm
Character vector of
vm_statoutput lines.- page_size
Page size in bytes, as returned by
vm_stat_page_size().
Details
Split from get_free_ram_mb() so the page-size and page-class handling can be
checked without a macOS host.