linux: use MemAvailable instead of MemFree (#3351)

Fixes: https://github.com/nodejs/node/issues/23892
This commit is contained in:
Andrey Hohutkin 2022-01-03 12:24:19 +02:00 committed by GitHub
parent 0a47e4c771
commit beb64b0a88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -788,7 +788,7 @@ uint64_t uv_get_free_memory(void) {
struct sysinfo info;
uint64_t rc;
rc = uv__read_proc_meminfo("MemFree:");
rc = uv__read_proc_meminfo("MemAvailable:");
if (rc != 0)
return rc;