From 45f7a4fc8dfc469e5686e22d8feeda044f93d801 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 26 Dec 2011 22:04:29 +0000 Subject: [PATCH] Remove old memory debugging routines. We have Valgrind nowadays. --- AffinityPanel.c | 1 - AvailableColumnsPanel.c | 1 - AvailableMetersPanel.c | 1 - BatteryMeter.c | 1 - CPUMeter.c | 1 - CRT.c | 1 - CategoriesPanel.c | 1 - CheckItem.c | 1 - ClockMeter.c | 1 - ColorsPanel.c | 1 - ColumnsPanel.c | 1 - DebugMemory.c | 236 ---------------------------------------- DebugMemory.h | 69 ------------ DisplayOptionsPanel.c | 1 - FunctionBar.c | 1 - Hashtable.c | 2 - Header.c | 1 - HostnameMeter.c | 1 - ListItem.c | 1 - LoadAverageMeter.c | 1 - Makefile.am | 21 ++-- MemoryMeter.c | 1 - Meter.c | 1 - MetersPanel.c | 2 - Object.c | 1 - Panel.c | 1 - Process.c | 1 - ProcessList.c | 1 - RichString.c | 1 - RichString.h | 1 - ScreenManager.c | 1 - Settings.c | 1 - SignalsPanel.c | 1 - String.c | 1 - SwapMeter.c | 1 - TasksMeter.c | 1 - UptimeMeter.c | 1 - Vector.c | 2 - configure.ac | 2 +- debug.h | 28 ----- htop.c | 2 - 41 files changed, 8 insertions(+), 388 deletions(-) delete mode 100644 DebugMemory.c delete mode 100644 DebugMemory.h delete mode 100644 debug.h diff --git a/AffinityPanel.c b/AffinityPanel.c index db1fd572..729eec42 100644 --- a/AffinityPanel.c +++ b/AffinityPanel.c @@ -8,7 +8,6 @@ in the source distribution for its full text. #include "AffinityPanel.h" #include "CheckItem.h" -#include "debug.h" #include #include diff --git a/AvailableColumnsPanel.c b/AvailableColumnsPanel.c index 036503fd..fce9880c 100644 --- a/AvailableColumnsPanel.c +++ b/AvailableColumnsPanel.c @@ -9,7 +9,6 @@ in the source distribution for its full text. #include "Header.h" #include "ColumnsPanel.h" -#include "debug.h" #include #include diff --git a/AvailableMetersPanel.c b/AvailableMetersPanel.c index 5eedf21f..0cdb508f 100644 --- a/AvailableMetersPanel.c +++ b/AvailableMetersPanel.c @@ -10,7 +10,6 @@ in the source distribution for its full text. #include "CPUMeter.h" #include "Header.h" #include "ListItem.h" -#include "debug.h" #include #include diff --git a/BatteryMeter.c b/BatteryMeter.c index 45c07b33..ef7b346c 100644 --- a/BatteryMeter.c +++ b/BatteryMeter.c @@ -12,7 +12,6 @@ This meter written by Ian P. Hands (iphands@gmail.com, ihands@redhat.com). #include "ProcessList.h" #include "CRT.h" #include "String.h" -#include "debug.h" #include #include diff --git a/CPUMeter.c b/CPUMeter.c index 2239250c..90555ff6 100644 --- a/CPUMeter.c +++ b/CPUMeter.c @@ -9,7 +9,6 @@ in the source distribution for its full text. #include "CRT.h" #include "ProcessList.h" -#include "debug.h" #include #include diff --git a/CRT.c b/CRT.c index 459a9c2e..621adfcc 100644 --- a/CRT.c +++ b/CRT.c @@ -9,7 +9,6 @@ in the source distribution for its full text. #include "config.h" #include "String.h" -#include "debug.h" #include #include diff --git a/CategoriesPanel.c b/CategoriesPanel.c index ccdda9c4..0114ae4b 100644 --- a/CategoriesPanel.c +++ b/CategoriesPanel.c @@ -13,7 +13,6 @@ in the source distribution for its full text. #include "ColumnsPanel.h" #include "ColorsPanel.h" #include "AvailableColumnsPanel.h" -#include "debug.h" #include #include diff --git a/CheckItem.c b/CheckItem.c index 0a171f7b..0fb40cfd 100644 --- a/CheckItem.c +++ b/CheckItem.c @@ -8,7 +8,6 @@ in the source distribution for its full text. #include "CheckItem.h" #include "CRT.h" -#include "debug.h" #include #include diff --git a/ClockMeter.c b/ClockMeter.c index 51742538..7edf5bf1 100644 --- a/ClockMeter.c +++ b/ClockMeter.c @@ -8,7 +8,6 @@ in the source distribution for its full text. #include "ClockMeter.h" #include "CRT.h" -#include "debug.h" #include diff --git a/ColorsPanel.c b/ColorsPanel.c index aa9292d9..bf94bf53 100644 --- a/ColorsPanel.c +++ b/ColorsPanel.c @@ -9,7 +9,6 @@ in the source distribution for its full text. #include "CRT.h" #include "CheckItem.h" -#include "debug.h" #include #include diff --git a/ColumnsPanel.c b/ColumnsPanel.c index ec25d466..d6b442a3 100644 --- a/ColumnsPanel.c +++ b/ColumnsPanel.c @@ -8,7 +8,6 @@ in the source distribution for its full text. #include "ColumnsPanel.h" #include "String.h" -#include "debug.h" #include #include diff --git a/DebugMemory.c b/DebugMemory.c deleted file mode 100644 index f45e25da..00000000 --- a/DebugMemory.c +++ /dev/null @@ -1,236 +0,0 @@ -/* -htop - DebugMemory.c -(C) 2004-2011 Hisham H. Muhammad -Released under the GNU GPL, see the COPYING file -in the source distribution for its full text. -*/ - -#include -#include -#include -#include -#include - -#undef strdup -#undef malloc -#undef realloc -#undef calloc -#undef free - -#include "DebugMemory.h" - -/*{ - -typedef struct DebugMemoryItem_ DebugMemoryItem; - -struct DebugMemoryItem_ { - int magic; - void* data; - char* file; - int line; - DebugMemoryItem* next; -}; - -typedef struct DebugMemory_ { - DebugMemoryItem* first; - int allocations; - int deallocations; - int size; - bool totals; - FILE* file; -} DebugMemory; - -}*/ - -#if defined(DEBUG) - -static DebugMemory* singleton = NULL; - -void DebugMemory_new() { - if (singleton) - return; - singleton = malloc(sizeof(DebugMemory)); - singleton->first = NULL; - singleton->allocations = 0; - singleton->deallocations = 0; - singleton->size = 0; - #ifdef DEBUG_ALLOC - singleton->file = fopen("/tmp/htop-debug-alloc.txt", "w"); - #else - singleton->file = NULL; - #endif - singleton->totals = true; - //singleton->file = NULL; -} - -void* DebugMemory_malloc(int size, char* file, int line, char* str) { - void* data = malloc(size); - DebugMemory_registerAllocation(data, file, line); - if (singleton->file) { - if (singleton->totals) fprintf(singleton->file, "%d\t", singleton->size); - fprintf(singleton->file, "%d\t%s:%d (%s)\n", size, file, line, str); - } - return data; -} - -void* DebugMemory_calloc(int a, int b, char* file, int line) { - void* data = calloc(a, b); - DebugMemory_registerAllocation(data, file, line); - if (singleton->file) { - if (singleton->totals) fprintf(singleton->file, "%d\t", singleton->size); - fprintf(singleton->file, "%d\t%s:%d\n", a*b, file, line); - } - return data; -} - -void* DebugMemory_realloc(void* ptr, int size, char* file, int line, char* str) { - if (ptr != NULL) - DebugMemory_registerDeallocation(ptr, file, line); - void* data = realloc(ptr, size); - DebugMemory_registerAllocation(data, file, line); - if (singleton->file) { - if (singleton->totals) fprintf(singleton->file, "%d\t", singleton->size); - fprintf(singleton->file, "%d\t%s:%d (%s)\n", size, file, line, str); - } - return data; -} - -void* DebugMemory_strdup(const char* str, char* file, int line) { - assert(str); - char* data = strdup(str); - DebugMemory_registerAllocation(data, file, line); - if (singleton->file) { - if (singleton->totals) fprintf(singleton->file, "%d\t", singleton->size); - fprintf(singleton->file, "%d\t%s:%d\n", (int) strlen(str), file, line); - } - return data; -} - -void DebugMemory_free(void* data, char* file, int line) { - if (!data) return; - DebugMemory_registerDeallocation(data, file, line); - if (singleton->file) { - if (singleton->totals) fprintf(singleton->file, "%d\t", singleton->size); - fprintf(singleton->file, "free\t%s:%d\n", file, line); - } - free(data); -} - -void DebugMemory_assertSize() { - if (!singleton->first) { - assert (singleton->size == 0); - } - DebugMemoryItem* walk = singleton->first; - int i = 0; - while (walk != NULL) { - assert(walk->magic == 11061980); - i++; - walk = walk->next; - } - assert (i == singleton->size); -} - -int DebugMemory_getBlockCount() { - if (!singleton->first) { - return 0; - } - DebugMemoryItem* walk = singleton->first; - int i = 0; - while (walk != NULL) { - assert(walk->magic == 11061980); - i++; - walk = walk->next; - } - return i; -} - -void DebugMemory_registerAllocation(void* data, char* file, int line) { - if (!singleton) - DebugMemory_new(); - DebugMemory_assertSize(); - DebugMemoryItem* item = (DebugMemoryItem*) malloc(sizeof(DebugMemoryItem)); - item->magic = 11061980; - item->data = data; - item->file = file; - item->line = line; - item->next = NULL; - int val = DebugMemory_getBlockCount(); - if (singleton->first == NULL) { - assert (val == 0); - singleton->first = item; - } else { - DebugMemoryItem* walk = singleton->first; - while (true) { - if (walk->next == NULL) { - walk->next = item; - break; - } - assert(walk->magic == 11061980); - walk = walk->next; - } - } - int nval = DebugMemory_getBlockCount(); - assert(nval == val + 1); - singleton->allocations++; - singleton->size++; - DebugMemory_assertSize(); -} - -void DebugMemory_registerDeallocation(void* data, char* file, int line) { - assert(singleton); - assert(singleton->first); - DebugMemoryItem* walk = singleton->first; - DebugMemoryItem* prev = NULL; - int val = DebugMemory_getBlockCount(); - while (walk != NULL) { - assert(walk->magic == 11061980); - if (walk->data == data) { - if (prev == NULL) { - singleton->first = walk->next; - } else { - prev->next = walk->next; - } - free(walk); - assert(DebugMemory_getBlockCount() == val - 1); - singleton->deallocations++; - singleton->size--; - DebugMemory_assertSize(); - return; - } - DebugMemoryItem* tmp = walk; - walk = walk->next; - prev = tmp; - } - DebugMemory_report(); - fprintf(stderr, "Couldn't find allocation for memory freed at %s:%d\n", file, line); - assert(false); -} - -void DebugMemory_report() { - assert(singleton); - DebugMemoryItem* walk = singleton->first; - int i = 0; - while (walk != NULL) { - assert(walk->magic == 11061980); - i++; - fprintf(stderr, "%p %s:%d\n", walk->data, walk->file, walk->line); - DebugMemoryItem* old = walk; - walk = walk->next; - free(old->file); - free(old); - } - fprintf(stderr, "Total:\n"); - fprintf(stderr, "%d allocations\n", singleton->allocations); - fprintf(stderr, "%d deallocations\n", singleton->deallocations); - fprintf(stderr, "%d size\n", singleton->size); - fprintf(stderr, "%d non-freed blocks\n", i); - if (singleton->file) - fclose(singleton->file); - free(singleton); -} - -#elif defined(DEBUGLITE) - -//#include "efence.h" - -#endif diff --git a/DebugMemory.h b/DebugMemory.h deleted file mode 100644 index d0b8a3d2..00000000 --- a/DebugMemory.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Do not edit this file. It was automatically generated. */ - -#ifndef HEADER_DebugMemory -#define HEADER_DebugMemory -/* -htop - DebugMemory.h -(C) 2004-2011 Hisham H. Muhammad -Released under the GNU GPL, see the COPYING file -in the source distribution for its full text. -*/ - -#undef strdup -#undef malloc -#undef realloc -#undef calloc -#undef free - - -typedef struct DebugMemoryItem_ DebugMemoryItem; - -struct DebugMemoryItem_ { - int magic; - void* data; - char* file; - int line; - DebugMemoryItem* next; -}; - -typedef struct DebugMemory_ { - DebugMemoryItem* first; - int allocations; - int deallocations; - int size; - bool totals; - FILE* file; -} DebugMemory; - - -#if defined(DEBUG) - -void DebugMemory_new(); - -void* DebugMemory_malloc(int size, char* file, int line, char* str); - -void* DebugMemory_calloc(int a, int b, char* file, int line); - -void* DebugMemory_realloc(void* ptr, int size, char* file, int line, char* str); - -void* DebugMemory_strdup(const char* str, char* file, int line); - -void DebugMemory_free(void* data, char* file, int line); - -void DebugMemory_assertSize(); - -int DebugMemory_getBlockCount(); - -void DebugMemory_registerAllocation(void* data, char* file, int line); - -void DebugMemory_registerDeallocation(void* data, char* file, int line); - -void DebugMemory_report(); - -#elif defined(DEBUGLITE) - -//#include "efence.h" - -#endif - -#endif diff --git a/DisplayOptionsPanel.c b/DisplayOptionsPanel.c index a895125d..bf521a81 100644 --- a/DisplayOptionsPanel.c +++ b/DisplayOptionsPanel.c @@ -8,7 +8,6 @@ in the source distribution for its full text. #include "DisplayOptionsPanel.h" #include "CheckItem.h" -#include "debug.h" #include #include diff --git a/FunctionBar.c b/FunctionBar.c index fae05556..dc4368ef 100644 --- a/FunctionBar.c +++ b/FunctionBar.c @@ -8,7 +8,6 @@ in the source distribution for its full text. #include "FunctionBar.h" #include "CRT.h" -#include "debug.h" #include #include diff --git a/Hashtable.c b/Hashtable.c index 55070033..9d84db8a 100644 --- a/Hashtable.c +++ b/Hashtable.c @@ -7,8 +7,6 @@ in the source distribution for its full text. #include "Hashtable.h" -#include "debug.h" - #include #include diff --git a/Header.c b/Header.c index 4203a171..ea1078ff 100644 --- a/Header.c +++ b/Header.c @@ -18,7 +18,6 @@ in the source distribution for its full text. #include "ClockMeter.h" #include "HostnameMeter.h" #include "String.h" -#include "debug.h" #include #include diff --git a/HostnameMeter.c b/HostnameMeter.c index 08e3fb60..0498ab76 100644 --- a/HostnameMeter.c +++ b/HostnameMeter.c @@ -8,7 +8,6 @@ in the source distribution for its full text. #include "HostnameMeter.h" #include "CRT.h" -#include "debug.h" #include diff --git a/ListItem.c b/ListItem.c index 0328f6a4..9beed0cb 100644 --- a/ListItem.c +++ b/ListItem.c @@ -10,7 +10,6 @@ in the source distribution for its full text. #include "CRT.h" #include "String.h" #include "RichString.h" -#include "debug.h" #include #include diff --git a/LoadAverageMeter.c b/LoadAverageMeter.c index e307b071..9d5071b1 100644 --- a/LoadAverageMeter.c +++ b/LoadAverageMeter.c @@ -8,7 +8,6 @@ in the source distribution for its full text. #include "LoadAverageMeter.h" #include "CRT.h" -#include "debug.h" #include #include diff --git a/Makefile.am b/Makefile.am index b648969b..451d8648 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,12 +10,11 @@ applications_DATA = htop.desktop pixmapdir = $(datadir)/pixmaps pixmap_DATA = htop.png -htop_CFLAGS = -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -AM_CFLAGS = -AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" +htop_CFLAGS = -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"$(sysconfdir)\" +AM_CPPFLAGS = -DNDEBUG myhtopsources = AvailableMetersPanel.c CategoriesPanel.c CheckItem.c \ -ClockMeter.c ColorsPanel.c ColumnsPanel.c CPUMeter.c CRT.c DebugMemory.c \ +ClockMeter.c ColorsPanel.c ColumnsPanel.c CPUMeter.c CRT.c \ DisplayOptionsPanel.c FunctionBar.c Hashtable.c Header.c htop.c ListItem.c \ LoadAverageMeter.c MemoryMeter.c Meter.c MetersPanel.c Object.c Panel.c \ BatteryMeter.c Process.c ProcessList.c RichString.c ScreenManager.c Settings.c \ @@ -25,7 +24,7 @@ HostnameMeter.c OpenFilesScreen.c Affinity.c myhtopheaders = AvailableColumnsPanel.h AvailableMetersPanel.h \ CategoriesPanel.h CheckItem.h ClockMeter.h ColorsPanel.h ColumnsPanel.h \ -CPUMeter.h CRT.h DebugMemory.h DisplayOptionsPanel.h FunctionBar.h \ +CPUMeter.h CRT.h DisplayOptionsPanel.h FunctionBar.h \ Hashtable.h Header.h htop.h ListItem.h LoadAverageMeter.h MemoryMeter.h \ BatteryMeter.h Meter.h MetersPanel.h Object.h Panel.h ProcessList.h RichString.h \ ScreenManager.h Settings.h SignalsPanel.h String.h \ @@ -35,19 +34,13 @@ Process.h AffinityPanel.h HostnameMeter.h OpenFilesScreen.h Affinity.h SUFFIXES = .h BUILT_SOURCES = $(myhtopheaders) -htop_SOURCES = $(myhtopheaders) $(myhtopsources) config.h debug.h +htop_SOURCES = $(myhtopheaders) $(myhtopsources) config.h profile: - $(MAKE) all CFLAGS="-pg -O2" + $(MAKE) all CFLAGS="" AM_CPPFLAGS="-pg -O2" debug: - $(MAKE) all CFLAGS="-ggdb -DDEBUG" - -hardened-debug: - $(MAKE) all CFLAGS="-ggdb -DDEBUG" LDFLAGS="-nopie" - -debuglite: - $(MAKE) all CFLAGS="-ggdb -DDEBUGLITE" + $(MAKE) all CFLAGS="" AM_CPPFLAGS="-ggdb -DDEBUG" .c.h: scripts/MakeHeader.py $< diff --git a/MemoryMeter.c b/MemoryMeter.c index 656a2b98..fa897d7e 100644 --- a/MemoryMeter.c +++ b/MemoryMeter.c @@ -9,7 +9,6 @@ in the source distribution for its full text. #include "CRT.h" #include "ProcessList.h" -#include "debug.h" #include #include diff --git a/Meter.c b/Meter.c index c67bf39e..b009d667 100644 --- a/Meter.c +++ b/Meter.c @@ -21,7 +21,6 @@ in the source distribution for its full text. #include "CRT.h" #include "String.h" #include "ListItem.h" -#include "debug.h" #include #include diff --git a/MetersPanel.c b/MetersPanel.c index 20d29d79..8302c5a7 100644 --- a/MetersPanel.c +++ b/MetersPanel.c @@ -7,8 +7,6 @@ in the source distribution for its full text. #include "MetersPanel.h" -#include "debug.h" - #include #include diff --git a/Object.c b/Object.c index ca9de8b8..395bd10a 100644 --- a/Object.c +++ b/Object.c @@ -8,7 +8,6 @@ in the source distribution for its full text. #include "Object.h" #include "CRT.h" -#include "debug.h" #include #include diff --git a/Panel.c b/Panel.c index 74f07564..b090c525 100644 --- a/Panel.c +++ b/Panel.c @@ -11,7 +11,6 @@ in the source distribution for its full text. #include "RichString.h" #include "ListItem.h" #include "String.h" -#include "debug.h" #include #include diff --git a/Process.c b/Process.c index 7c48e67a..1ae96e1a 100644 --- a/Process.c +++ b/Process.c @@ -11,7 +11,6 @@ in the source distribution for its full text. #include "CRT.h" #include "String.h" #include "RichString.h" -#include "debug.h" #include #include diff --git a/ProcessList.c b/ProcessList.c index 453a77e8..04f761c6 100644 --- a/ProcessList.c +++ b/ProcessList.c @@ -9,7 +9,6 @@ in the source distribution for its full text. #include "CRT.h" #include "String.h" -#include "debug.h" #include #include diff --git a/RichString.c b/RichString.c index 7f316b68..eca2293e 100644 --- a/RichString.c +++ b/RichString.c @@ -16,7 +16,6 @@ in the source distribution for its full text. #include "config.h" #include -#include "debug.h" #include #ifdef HAVE_NCURSESW_CURSES_H #include diff --git a/RichString.h b/RichString.h index 9f5ebc70..1b4d244a 100644 --- a/RichString.h +++ b/RichString.h @@ -14,7 +14,6 @@ in the source distribution for its full text. #include "config.h" #include -#include "debug.h" #include #ifdef HAVE_NCURSESW_CURSES_H #include diff --git a/ScreenManager.c b/ScreenManager.c index 4cc18e4d..744ea2b0 100644 --- a/ScreenManager.c +++ b/ScreenManager.c @@ -9,7 +9,6 @@ in the source distribution for its full text. #include "Panel.h" #include "Object.h" -#include "debug.h" #include #include diff --git a/Settings.c b/Settings.c index 76ed2e27..f2573e82 100644 --- a/Settings.c +++ b/Settings.c @@ -9,7 +9,6 @@ in the source distribution for its full text. #include "String.h" #include "Vector.h" -#include "debug.h" #include #include diff --git a/SignalsPanel.c b/SignalsPanel.c index afc784a2..e1a88b57 100644 --- a/SignalsPanel.c +++ b/SignalsPanel.c @@ -9,7 +9,6 @@ in the source distribution for its full text. #include "ListItem.h" #include "RichString.h" -#include "debug.h" #include #include diff --git a/String.c b/String.c index dcae2985..adb67496 100644 --- a/String.c +++ b/String.c @@ -8,7 +8,6 @@ in the source distribution for its full text. #include "String.h" #include "config.h" -#include "debug.h" #include #include diff --git a/SwapMeter.c b/SwapMeter.c index 14c58a89..48a7dae0 100644 --- a/SwapMeter.c +++ b/SwapMeter.c @@ -9,7 +9,6 @@ in the source distribution for its full text. #include "CRT.h" #include "ProcessList.h" -#include "debug.h" #include #include diff --git a/TasksMeter.c b/TasksMeter.c index ecff933c..cfe03093 100644 --- a/TasksMeter.c +++ b/TasksMeter.c @@ -9,7 +9,6 @@ in the source distribution for its full text. #include "ProcessList.h" #include "CRT.h" -#include "debug.h" /*{ #include "Meter.h" diff --git a/UptimeMeter.c b/UptimeMeter.c index 2987864e..d31f911f 100644 --- a/UptimeMeter.c +++ b/UptimeMeter.c @@ -9,7 +9,6 @@ in the source distribution for its full text. #include "ProcessList.h" #include "CRT.h" -#include "debug.h" #include diff --git a/Vector.c b/Vector.c index 70f8afcd..955d99c7 100644 --- a/Vector.c +++ b/Vector.c @@ -7,8 +7,6 @@ in the source distribution for its full text. #include "Vector.h" -#include "debug.h" - #include #include #include diff --git a/configure.ac b/configure.ac index 350c3207..639d048d 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.65) -AC_INIT([htop],[1.0],[loderunner@users.sourceforge.net]) +AC_INIT([htop],[1.0.1],[loderunner@users.sourceforge.net]) # The following two lines are required by hwloc scripts AC_USE_SYSTEM_EXTENSIONS diff --git a/debug.h b/debug.h deleted file mode 100644 index ec2f883e..00000000 --- a/debug.h +++ /dev/null @@ -1,28 +0,0 @@ - -#if defined(DEBUG) - - /* Full debug */ - #include "DebugMemory.h" - #define calloc(a, b) DebugMemory_calloc(a, b, __FILE__, __LINE__) - #define malloc(x) DebugMemory_malloc(x, __FILE__, __LINE__, #x) - #define realloc(x,s) DebugMemory_realloc(x, s, __FILE__, __LINE__, #x) - #define strdup(x) DebugMemory_strdup(x, __FILE__, __LINE__) - #define free(x) DebugMemory_free(x, __FILE__, __LINE__) - #define debug_done() DebugMemory_report(); _nc_freeall() - -#elif defined(DEBUGLITE) - - /* Assertions and core only */ - #ifdef NDEBUG - #undef NDEBUG - #endif - #define debug_done() - -#else - - /* No debugging */ - #define NDEBUG - #define debug_done() - -#endif - diff --git a/htop.c b/htop.c index fec7c77e..e2150a75 100644 --- a/htop.c +++ b/htop.c @@ -22,7 +22,6 @@ in the source distribution for its full text. #include "TraceScreen.h" #include "OpenFilesScreen.h" #include "AffinityPanel.h" -#include "debug.h" #include #include @@ -914,6 +913,5 @@ int main(int argc, char** argv) { ((Object*)killPanel)->delete((Object*)killPanel); UsersTable_delete(ut); Settings_delete(settings); - debug_done(); return 0; }