Commit 518cfe30 authored by Martin Schultz's avatar Martin Schultz
Browse files

fixes #32 by applying the patch provided by a dielen.

ps: i am still missing around 700 mb mrmory from the provided information, but this is better than before
parent 5a72fed8
......@@ -133,10 +133,8 @@ namespace Utils
physical_memory = 0;
}
// retrieve free memory
double total = vmstat.wire_count + vmstat.active_count + vmstat.inactive_count + vmstat.free_count;
double free = vmstat.free_count / total;
_outMemoryVacancy.totalRamMB = physical_memory / 1024 / 1024;
_outMemoryVacancy.freeRamMB = (long)(free + vmstat.inactive_count) * PAGE_SIZE / 1024/1024;
_outMemoryVacancy.freeRamMB = (long)(vmstat.free_count + vmstat.inactive_count) * PAGE_SIZE / 1024 / 1024;
_outMemoryVacancy.bufferRamMB =0;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment