fix calloc() calls

* size_t nmemb (number of elements) first, then size_t size
* do not assume char is size 1 but use sizeof()
* allocate for char, not pointer to char (found by Michael McConville,
  fixes #261)
6 files changed
tree: 805d2289d12bfe40cdd3272ff2ddb1c3eabc790d
  1. .gitignore
  2. AUTHORS
  3. Action.c
  4. Action.h
  5. Affinity.c
  6. Affinity.h
  7. AffinityPanel.c
  8. AffinityPanel.h
  9. AvailableColumnsPanel.c
  10. AvailableColumnsPanel.h
  11. AvailableMetersPanel.c
  12. AvailableMetersPanel.h
  13. BatteryMeter.c
  14. BatteryMeter.h
  15. COPYING
  16. CPUMeter.c
  17. CPUMeter.h
  18. CRT.c
  19. CRT.h
  20. CategoriesPanel.c
  21. CategoriesPanel.h
  22. ChangeLog
  23. CheckItem.c
  24. CheckItem.h
  25. ClockMeter.c
  26. ClockMeter.h
  27. ColorsPanel.c
  28. ColorsPanel.h
  29. ColumnsPanel.c
  30. ColumnsPanel.h
  31. DisplayOptionsPanel.c
  32. DisplayOptionsPanel.h
  33. FunctionBar.c
  34. FunctionBar.h
  35. Hashtable.c
  36. Hashtable.h
  37. Header.c
  38. Header.h
  39. HostnameMeter.c
  40. HostnameMeter.h
  41. INSTALL
  42. IncSet.c
  43. IncSet.h
  44. ListItem.c
  45. ListItem.h
  46. LoadAverageMeter.c
  47. LoadAverageMeter.h
  48. MainPanel.c
  49. MainPanel.h
  50. Makefile.am
  51. MemoryMeter.c
  52. MemoryMeter.h
  53. Meter.c
  54. Meter.h
  55. MetersPanel.c
  56. MetersPanel.h
  57. NEWS
  58. Object.c
  59. Object.h
  60. OpenFilesScreen.c
  61. OpenFilesScreen.h
  62. Panel.c
  63. Panel.h
  64. Process.c
  65. Process.h
  66. ProcessList.c
  67. ProcessList.h
  68. README
  69. RichString.c
  70. RichString.h
  71. ScreenManager.c
  72. ScreenManager.h
  73. Settings.c
  74. Settings.h
  75. SignalsPanel.c
  76. SignalsPanel.h
  77. StringUtils.c
  78. StringUtils.h
  79. SwapMeter.c
  80. SwapMeter.h
  81. TESTPLAN
  82. TasksMeter.c
  83. TasksMeter.h
  84. TraceScreen.c
  85. TraceScreen.h
  86. UptimeMeter.c
  87. UptimeMeter.h
  88. UsersTable.c
  89. UsersTable.h
  90. Vector.c
  91. Vector.h
  92. autogen.sh
  93. configure.ac
  94. darwin/
  95. freebsd/
  96. htop.1.in
  97. htop.c
  98. htop.desktop
  99. htop.h
  100. htop.png
  101. linux/
  102. scripts/
  103. test_spec.lua
  104. unsupported/
README.md

htop

by Hisham Muhammad hisham@gobolinux.org

2004 - 2015

Introduction

This is htop, an interactive process viewer. It requires ncurses. It is developed primarily on Linux, but we also have code for running under FreeBSD and Mac OS X (help and testing are wanted for these platforms!)

This software has evolved considerably over the years, and is reasonably complete, but there is always room for improvement.

Comparison between ‘htop’ and classic ‘top’

  • In ‘htop’ you can scroll the list vertically and horizontally to see all processes and full command lines.
  • In ‘top’ you are subject to a delay for each unassigned key you press (especially annoying when multi-key escape sequences are triggered by accident).
  • ‘htop’ starts faster (‘top’ seems to collect data for a while before displaying anything).
  • In ‘htop’ you don't need to type the process number to kill a process, in ‘top’ you do.
  • In ‘htop’ you don't need to type the process number or the priority value to renice a process, in ‘top’ you do.
  • In ‘htop’ you can kill multiple processes at once.
  • ‘top’ is older, hence, more tested.

Compilation instructions

This program is distributed as a standard autotools-based package. See the INSTALL file for detailed instructions, but you are probably used to the common ./configure/make/make install routine.

When fetching the code from the development repository, you need to run the ./autogen.sh script, which in turn requires autotools to be installed.

See the manual page (man htop) or the on-line help (‘F1’ or ‘h’ inside htop) for a list of supported key commands.

if not all keys work check your curses configuration.