summaryrefslogtreecommitdiffstats
path: root/Vector.c
AgeCommit message (Collapse)Author
2020-11-17Avoid calling Object_isA from inside Vector_isConsistentBenny Baumann
2020-11-17Hashtable updateChristian Göttsche
- use consistent type for key by introducing a new typedef - use unsigned types for sizes - name parameters in foreach function typedef
2020-11-02Embracing branchesBenny Baumann
2020-11-02Spacing around operatorsBenny Baumann
2020-11-02Spacing after keywords (if)Benny Baumann
2020-11-02Assert Vector_get returns an objectChristian Göttsche
It is generally assumed Vector_get returns a non-NULL object. Use a generic assert in Vector_get instead of in callers.
2020-10-27Drop duplicate and always true conditionChristian Göttsche
This block is only entered if this->owner is true.
2020-10-26Hold only a const version of Settings in ProcessListChristian Göttsche
2020-10-18Make all required includes explicitBenny Baumann
Information as seen by IWYU 0.12 + clang 9 on Linux
2020-10-16Misc Vector updatesChristian Göttsche
- Move swap() macro to source file and implement as function - Implement Vector_get() and Vector_size() as inline functions to make them type safe and avoid lhs usage - Comment comparison statistics, they are only needed for performance testing
2020-10-15Mark Vector parameter const for non-modifying functionsChristian Göttsche
2020-10-15Mark search parameter in Vector_indexOf constChristian Göttsche
2020-10-07Mark Object classes and Object class fields constChristian Göttsche
2020-10-07Replace copy loop by memmove in Vector_insertBenny Baumann
This is basically the same change like in Vector_take, just in the opposite direction.
2020-10-07Use memmove for Vector_takeBenny Baumann
Doing a quick check with callgrind this gives an average reduction from 1804 cycles/call down to 491 cycles/call on my test system. The average was taken over about 40k calls.
2020-10-05Update License consistently to GPLv2 as per COPYING fileDaniel Lange
2020-10-03Resolve DEBUG compilation issuesChristian Göttsche
Use NDEBUG conditional instead of DEBUG. Do not call static functions in extern inline ones. Vector.c:67:11: error: static function 'Vector_isConsistent' is used in an inline function with external linkage [-Werror,-Wstatic-in-inline]
2020-10-02minor typo in Vector.cckath
2020-09-29Drop redundant casts to the same typeChristian Göttsche
2020-09-12Clean up some code duplication in the header filesHugo Musso Gualandi
PR htop-dev/htop#70 got rid of the infrastructure for generating header files, but it left behind some code duplication. Some of cases are things that belong in the header file and don't need to be repeated in the C file. Other cases are things that belong in the C file and don't need to be in the header file. In this commit I tried to fix all of these that I could find. When given a choice I preferred keeping things out of the header file, unless they were being used by someone else.
2020-09-03Axe automated header generation.Zev Weiss
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.
2020-08-26Merge branch 'ci-hwloc-job' of https://github.com/bertwesarg/htop into ↵Nathan Scott
bertwesarg-ci-hwloc-job
2019-10-31Clean up existing whitespaceDaniel Flanagan
2018-02-05Optimize Vector_size on non-debug buildsHisham Muhammad
2016-02-02Check for failure in allocations.Hisham
2015-09-16Clean up some needless malloc casts, convert some mallocs to callocs, and ↵Michael McConville
fix some style
2015-04-08This assert is no longer valid.Hisham Muhammad
2015-02-03Complete cursor-based movement of headers.Hisham Muhammad
2014-04-21shorten scope of variable.Hisham Muhammad
2012-12-05Changes in object model: separate class objects to store vtable. Also, nicer ↵Hisham Muhammad
UTF-8 display of big numbers.
2012-11-10search and filter for the strace and lsof screens!Hisham Muhammad
2011-12-26Remove old memory debugging routines. We have Valgrind nowadays.Hisham Muhammad
2011-12-26major header cleanupHisham Muhammad
2011-11-18Mega-commit with features and tweaks for 1.0:Hisham Muhammad
* Performance improvements * Support for splitting CPU meters into two or four columns (thanks to Wim Heirman) * Switch from PLPA, which is now deprecated, to HWLOC. * Bring back support for native Linux sched_setaffinity, so we don't have to use HWLOC where we don't need to. * Support for typing in user names and column fields in selection panels.
2011-05-26Tempus fugit.Hisham Muhammad
2010-11-22Fix off-by-one in Vector (the probable cause for many user-reported crashes?)Hisham Muhammad
2010-06-17expand/collapse treeHisham Muhammad
2010-02-25Tempus fugit.Hisham Muhammad
2010-02-25warning fixesHisham Muhammad
2008-03-09Clean up headers by using 'static' whenever possible.Hisham Muhammad
Reduces resulting code size.
2006-11-12Add debugging sanity checks.Hisham Muhammad
2006-11-08Yet another sanity check.Hisham Muhammad
2006-07-11Performance improvement hackathon: improve process comparison routines,Hisham Muhammad
disable useless code in release builds such as runtime type-checking on dynamic data structures and process fields that are not being computed, faster(?) method for verifying the process owner (still need to ensure correctness), don't destroy and create process objects for hidden kernel threads over and over. Phew. I shouldn't be doing all this today, but I could not resist.
2006-06-06Updates for new version of the MakeHeader.py script.Hisham Muhammad
2006-05-30Rename TypedVector to Vector, matching dit.Hisham Muhammad