summaryrefslogtreecommitdiff
path: root/src/print_mem.c
AgeCommit message (Collapse)Author
2020-05-01Fix various warningsOrestis Floros
- unused variable ‘walk’ [-Wunused-variable] - implicit declaration of built-in function ‘free’ [-Wimplicit-function-declaration] - initialization discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] - variable 'ram_used' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]. This is actually easily reproducible by specifying `memory_used_method = "XXX"`. - comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] (for `exponent`)
2020-03-31use format_placeholder for memFelix Buehler
2019-11-24print_mem: Fix overflow on 32-bit systemszsugabubus
Values stored as `unsigned long` in "/proc/meminfo" but they were handled as `long`. On 32-bit systems with 4G memory it results in integer overflow.
2019-10-26Introduce memory options 'unit' and 'decimals'MK13
Previously the format placeholders were auto-converted to the maximum possible unit, e.g. /proc/meminfo reports MemTotal of 16307104kB which will get converted to 15.6GiB. It is now possible to specifiy the target unit, e.g. Mi, which will be used for the conversion - in the example it would lead to 15924.9MiB. The resulting number can now be further formatted via the decimal option. It allows to specify the number of decimals to use, e.g. 15.6GiB vs. 15GiB or 15924.9MiB vs. 15925MiB.
2019-07-29Improve NetBSD port. (#361)Thomas Klausner
Detect and link against ossaudio. Comment out unused code and functions.
2019-01-23Switch to autotools (#316)Michael Stapelberg
2018-07-13able to print percentageFelix Buehler
its now possible to have percentage before and after a variable. except for the date. But percentage with dates does not make much sense to me, so i skipped it.
2018-06-20Avoid assigning a new value to a var before using the old valueOlivier Gayot
Signed-off-by: Olivier Gayot <olivier.gayot@sigexec.com>
2018-05-04Simplify the memory thresholdsBenedikt Heine
2018-05-04Rename ram variables consistentlyBenedikt Heine
2018-04-11Implement support for memory-usage on LinuxFelix Buehler