Add support for MemAvailable (!10)
MemAvailable is in /proc/meminfo since Linux 3.14. This aligns the reported memory usage with the memory usage reported by xfce4-systemload-plugin. Closes !10
This commit is contained in:
@@ -25,12 +25,13 @@ static gushort _cpu_count = 0;
|
||||
*/
|
||||
|
||||
gboolean
|
||||
get_memory_usage (guint64 *memory_total, guint64 *memory_free, guint64 *memory_cache, guint64 *memory_buffers, guint64 *swap_total, guint64 *swap_free)
|
||||
get_memory_usage (guint64 *memory_total, guint64 *memory_available, guint64 *memory_free, guint64 *memory_cache, guint64 *memory_buffers, guint64 *swap_total, guint64 *swap_free)
|
||||
{
|
||||
*memory_total = 0;
|
||||
*memory_free = 0;
|
||||
*memory_cache = 0;
|
||||
*memory_buffers = 0;
|
||||
*memory_available = 0;
|
||||
*swap_total = 0;
|
||||
*swap_free = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user