On MacOS, os::available_memory() is implemented as "return free space". That number is way too low to give any indication of how much memory we can use. Looks like MacOS grabs most of the memory unused by applications for internal use, but seems to give it back willingly in case of needs.
Example: On my 32G macbook, istat shows me free memory of ~9G, but os::available_memory seems to constantly hover around 100..300MB.
We need a metric closer to the logic on Linux.
Example: On my 32G macbook, istat shows me free memory of ~9G, but os::available_memory seems to constantly hover around 100..300MB.
We need a metric closer to the logic on Linux.