This is real, physical memory available for applications to
use. We should not try to pretend otherwise; its confusing
for users and inconsistent with all other tools.
This situation can arise if pcp-htop screen is resized right
at the same time sampling from pmcd(1) is happening. Have a
couple more goes at it before giving up entirely; once there
is no data available though we cannot proceed into accessing
the sample result data structure (segv will result) so a new
short-circuit guard is added there also.
This closes a nasty memory leak. There is at least another leak looming somewhere when Disk I/O is shown in the header area. That could very well be an issue within libdevstat native to FreeBSD.
Add an explicit else clause so a following else branch for a prior if
condition does not get mixed up.
Also force a trailing semicolon and thereby silence current
-Wextra-semi-stmt warnings.
Improve readability of the hwloc_bitmap_foreach_begin loop macro.
Insert space padding between a header (e.g. 'if', 'for', 'while'...) and the
following paren. ex:
if(isFoo((a+2), b))
bar(a, b);
becomes:
if (isFoo((a+2), b))
bar(a, b);
Link: http://astyle.sourceforge.net/astyle.html#_pad-paren
Signed-off-by: Sohaib Mohamed <sohaib.amhmd@gmail.com>
Fixes builds failing with error
MainPanel.c:65:62: error: 'Settings {aka struct Settings_}' has no member named 'enableMouse'
if (ch != ERR && (ch != KEY_MOUSE || this->state->settings->enableMouse))
A process, whose executable has been replaced and thus marked by htop,
can be re-executed with the replaced executable, with the same PID, in
two ways: the Linux feature checkpoint/restore or re-execution of PID 1.
The actual check is just a string comparison, like the dropped
condition, leading to (almost) no computation overhead.
htop has been licensed as GPLv2 but there was inconsistency regarding the
option to choose "any later version" as granted by the license.
This commit clarifies the htop dev team is fine with that choice.