This PR enables building and running programs using LibComm on macOS (maybe also work for BSD and other, not tested). Previously it is not possible because memory_available only worked for Linux as it reads /proc/meminfo.
This is realized by a hack assuming half of the system memory is free. A more precise estimate would require call to external programs sysctl and calculation based on the output. However, it will complicate the code and is not necessary for the test purpose on macOS.
This PR enables building and running programs using LibComm on macOS (maybe also work for BSD and other, not tested). Previously it is not possible because
memory_available
only worked for Linux as it reads/proc/meminfo
.This is realized by a hack assuming half of the system memory is free. A more precise estimate would require call to external programs
sysctl
and calculation based on the output. However, it will complicate the code and is not necessary for the test purpose on macOS.