summaryrefslogtreecommitdiffstats
path: root/MemoryMeter.c
Commit message (Collapse)AuthorAgeFilesLines
* Relocate include of config.h from header to source modeuleBenny Baumann2023-12-261-0/+2
|
* Update includes based on IWYUBenny Baumann2023-12-261-0/+1
|
* Incorporate shared memory in bar textKevin Bracey2023-10-261-1/+3
| | | | | | | | | | | | | | | | Shared memory is not available for reclaim, and plays an equally significant role in memory load as the "used" memory Since "shared" was separated from the "used" value, the basic "used/total" display in the bar text has become less meaningful for Linux, as it only reflects a subset of the claimed memory. The difference often isn't huge, but it can become so if tmpfs, shmget()/shm_open() or MAP_SHARED is heavily used. Improve the situation by adding shared memory to the "used" value in the memory bar text. [Reworded commit message and dropped "claimed" terminology as it is completely non-standard and does not match the output of free(1).]
* Move shared memory next to used memoryKevin Bracey2023-10-261-5/+5
| | | | | | | | | Shared memory is less available than buffers, so move it left next to used memory. This is in preparation for including shared memory in the basic "in use" for the bar text. It would not make sense to sum a discontiguous region.
* Replace isnan() with better comparisons (isgreater(), etc.)Explorer092023-08-181-5/+5
| | | | | | | | | | | | | | | | | | The standard isnan() function is defined to never throw FP exceptions even when the argument is a "signaling" NaN. This makes isnan() more expensive than (x != x) expression unless the compiler flag '-fno-signaling-nans' is given. Introduce functions isNaN(), isNonnegative(), isPositive(), sumPositiveValues() and compareRealNumbers(), and replace isnan() in htop's codebase with the new functions. These functions utilize isgreater() and isgreaterequal() comparisons, which do not throw FP exceptions on "quiet" NaNs, which htop uses extensively. With isnan() removed, there is no need to suppress the warning '-Wno-c11-extensions' in FreeBSD. Remove the code from 'configure.ac'. Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
* {Memory,Swap}Meter: add "compressed memory" metricsIvan Shapovalov2023-04-231-2/+17
| | | | | | | | For now, the semantics are mostly fit for Linux zswap subsystem. For instance, we add the third swap usage metric that indicates the amount of memory that is accounted to swap but in fact stored elsewhere. This exactly matches the definition of frontswap/zswap, and is probably of little use to all other platforms.
* {Memory,Swap}Meter: make sure new constants are used consistentlyIvan Shapovalov2023-04-231-2/+4
|
* Improve code readability by creating constants for memory valuesGuillaume Gomez2023-01-071-10/+10
|
* Ensure consistent reporting of MemoryMeter used memoryNathan Scott2021-10-121-1/+1
| | | | Resolves #821
* Update license headers to explicitly say GPLv2+Daniel Lange2021-09-221-1/+1
|
* cleaned up includes with iwyumayurdahibhate2021-05-101-0/+1
|
* MemoryMeter: show shared memory before cachedChristian Göttsche2021-03-171-9/+9
| | | | | | Shared memory is less free-able than cached memory. Show it beforehand.
* Linux: individually show shared memoryChristian Göttsche2021-03-151-6/+15
| | | | | | | | Shmem: Total memory used by shared memory (shmem) and tmpfs Source: https://www.kernel.org/doc/Documentation/filesystems/proc.txt Closes: #556
* Save text buffer in MeterChristian Göttsche2021-03-041-1/+3
|
* Linux: overhaul memory partitionChristian Göttsche2021-02-071-2/+21
| | | | | | | Use similar calculation than procps. Show AvailableMemory in text mode. Use total minus available memory instead of manually computed used- memory as fraction part in bar mode (if available).
* Split RichString_(append|appendn|write) into wide and asciiChristian Göttsche2020-12-081-8/+8
| | | | | | | | RichString_writeFrom takes a top spot during performance analysis due to the calls to mbstowcs() and iswprint(). Most of the time we know in advance that we are only going to print regular ASCII characters.
* Use sizeof buffer instead of magic numberChristian Göttsche2020-12-081-4/+4
|
* Introduce METER_BUFFER_CHECK and METER_BUFFER_APPEND_CHR to cleanup writing ↵Christian Göttsche2020-12-061-6/+5
| | | | | | to bar buffers Closes: #294
* Use size_t as len type for Meter_UpdateValuesChristian Göttsche2020-12-061-1/+1
| | | | Most of the time the parameter is passed to snprintf type functions
* Make all required includes explicitBenny Baumann2020-10-181-6/+2
| | | | Information as seen by IWYU 0.12 + clang 9 on Linux
* Mark Object pointer to _display function constChristian Göttsche2020-10-101-2/+2
|
* Mark Object instances constChristian Göttsche2020-10-071-1/+1
|
* Update License consistently to GPLv2 as per COPYING fileDaniel Lange2020-10-051-1/+1
|
* Covert Meter attributes to file-local constant arraysChristian Göttsche2020-09-291-2/+4
|
* Axe automated header generation.Zev Weiss2020-09-031-3/+0
| | | | | | | | | | | | | | Reasoning: - implementation was unsound -- broke down when I added a fairly basic macro definition expanding to a struct initializer in a *.c file. - made it way too easy (e.g. via otherwise totally innocuous git commands) to end up with timestamps such that it always ran MakeHeader.py but never used its output, leading to overbuild noise when running what should be a null 'make'. - but mostly: it's just an awkward way of dealing with C code.
* Clean up existing whitespaceDaniel Flanagan2019-10-311-1/+1
|
* Rename Meter.setValues() functions to updateValues()Explorer092016-05-041-2/+2
| | | | | | | | | | | | Rationale (copied from htop issue #471): The function name "setValues" is misleading. For most OOP (object- oriented programming) contexts, setXXX functions mean they will change some member variables of an object into something specified in function arguments. But in the *Meter_setValues() case, the new values are not from the arguments, but from a hard-coded source. The caller is not supposed to change the values[] to anything it likes, but rather to "update" the values from the source. Hence, updateValues is a better name for this family of functions.
* use dynamic units for text displayChristian Hesse2015-08-271-12/+7
| | | | Signed-off-by: Christian Hesse <mail@eworm.de>
* make units more dynamicChristian Hesse2015-08-271-1/+9
| | | | Signed-off-by: Christian Hesse <mail@eworm.de>
* Changed MemoryMeter and SwapMeter to use short memory sizesTomasz Kramkowski2015-06-091-1/+1
| | | | | The MemoryMeter and SwapMeter now use the short GNU Coreutils style format to represent memory sizes.
* Add longer descriptions to available meters.Hisham Muhammad2015-02-031-3/+3
|
* Sorry about the mega-patch.Hisham Muhammad2015-01-211-10/+3
| | | | | This is a work-in-progress, code is currently broken. (Some actions, and notably, the header, are missing.)
* Make blue text more readable. Closes #55.Hisham Muhammad2014-04-241-1/+1
|
* BUGFIX: Fix crash when adding meters and toggling detailed CPU time.Hisham Muhammad2014-01-161-1/+1
| | | | | See https://bugzilla.redhat.com/show_bug.cgi?id=987805 for details. (thanks to Dawid Gajownik for the detailed analysis!)
* Remove explicit calls to curses.h in other filesHisham Muhammad2013-02-261-1/+0
|
* Changes in object model: separate class objects to store vtable. Also, nicer ↵Hisham Muhammad2012-12-051-3/+7
| | | | UTF-8 display of big numbers.
* Remove old memory debugging routines. We have Valgrind nowadays.Hisham Muhammad2011-12-261-1/+0
|
* major header cleanupHisham Muhammad2011-12-261-4/+7
|
* Tempus fugit.Hisham Muhammad2011-05-261-1/+1
|
* Remove arbitrary limit from rich stringsHisham Muhammad2010-11-221-2/+1
| | | | | | | | | Fix subtree hiding Fix reading of CPU values in hidden threads Fix hiding of zombie processes as kernel threads Remove "debug proc" code Code cleanup in processElements
* Tempus fugit.Hisham Muhammad2010-02-251-1/+1
|
* warning fixesHisham Muhammad2010-02-251-5/+5
|
* Clean up headers by using 'static' whenever possible.Hisham Muhammad2008-03-091-14/+14
| | | | | Reduces resulting code size.
* Perform RichString operations by hand.Hisham Muhammad2006-07-121-1/+1
| | | | | Avoid unnecessary operations when processing entries on ProcessList.
* Updates for new version of the MakeHeader.py script.Hisham Muhammad2006-06-061-3/+3
|
* - Overhaul meters implementation;Hisham Muhammad2006-04-101-43/+24
| | | | | | - add AllCPUsMeter; - because of that, the new .htoprc is incompatible with previous released versions.
* Initial import.Hisham Muhammad2006-03-041-0/+90

© 2014-2024 Faster IT GmbH | imprint | privacy policy