Commit 45f7a4fc authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Remove old memory debugging routines. We have Valgrind nowadays.

parent 84281bdc
......@@ -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 $<
......
......@@ -9,7 +9,6 @@ in the source distribution for its full text.
#include "CRT.h"
#include "ProcessList.h"
#include "debug.h"
#include <stdlib.h>
#include <curses.h>
......
......@@ -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 <math.h>
#include <string.h>
......
......@@ -7,8 +7,6 @@ in the source distribution for its full text.
#include "MetersPanel.h"
#include "debug.h"
#include <stdlib.h>
#include <assert.h>
......
......@@ -8,7 +8,6 @@ in the source distribution for its full text.
#include "Object.h"
#include "CRT.h"
#include "debug.h"
#include <stdlib.h>
#include <stdio.h>
......
......@@ -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 <math.h>
#include <stdbool.h>
......
......@@ -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 <stdio.h>
#include <sys/time.h>
......
......@@ -9,7 +9,6 @@ in the source distribution for its full text.
#include "CRT.h"
#include "String.h"
#include "debug.h"
#include <sys/time.h>
#include <sys/utsname.h>
......
......@@ -16,7 +16,6 @@ in the source distribution for its full text.
#include "config.h"
#include <ctype.h>
#include "debug.h"
#include <assert.h>
#ifdef HAVE_NCURSESW_CURSES_H
#include <ncursesw/curses.h>
......
......@@ -14,7 +14,6 @@ in the source distribution for its full text.
#include "config.h"
#include <ctype.h>
#include "debug.h"
#include <assert.h>
#ifdef HAVE_NCURSESW_CURSES_H
#include <ncursesw/curses.h>
......
......@@ -9,7 +9,6 @@ in the source distribution for its full text.
#include "Panel.h"
#include "Object.h"
#include "debug.h"
#include <assert.h>
#include <time.h>
......
......@@ -9,7 +9,6 @@ in the source distribution for its full text.
#include "String.h"
#include "Vector.h"
#include "debug.h"
#include <sys/stat.h>
#include <stdlib.h>
......
......@@ -9,7 +9,6 @@ in the source distribution for its full text.
#include "ListItem.h"
#include "RichString.h"
#include "debug.h"
#include <stdlib.h>
#include <assert.h>
......
......@@ -8,7 +8,6 @@ in the source distribution for its full text.
#include "String.h"
#include "config.h"
#include "debug.h"
#include <string.h>
#include <strings.h>
......
......@@ -9,7 +9,6 @@ in the source distribution for its full text.
#include "CRT.h"
#include "ProcessList.h"
#include "debug.h"
#include <stdlib.h>
#include <curses.h>
......
......@@ -9,7 +9,6 @@ in the source distribution for its full text.
#include "ProcessList.h"
#include "CRT.h"
#include "debug.h"
/*{
#include "Meter.h"
......
......@@ -9,7 +9,6 @@ in the source distribution for its full text.
#include "ProcessList.h"
#include "CRT.h"
#include "debug.h"
#include <math.h>
......
......@@ -7,8 +7,6 @@ in the source distribution for its full text.
#include "Vector.h"
#include "debug.h"
#include <assert.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -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
......
#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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment