diff options
author | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:20 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:20 +0200 |
commit | 85bb4ad9cb820ac3b8e935a930084a06cbfd2847 (patch) | |
tree | 681fd9b2d9fa80931b2a8bec4bb6667865b7c569 /DebugMemory.h | |
parent | ea859f50d9438bc61ae96721a4d255b49de78653 (diff) | |
download | debian_htop-85bb4ad9cb820ac3b8e935a930084a06cbfd2847.tar.gz debian_htop-85bb4ad9cb820ac3b8e935a930084a06cbfd2847.tar.bz2 debian_htop-85bb4ad9cb820ac3b8e935a930084a06cbfd2847.zip |
Imported Upstream version 0.6.3upstream/0.6.3
Diffstat (limited to 'DebugMemory.h')
-rw-r--r-- | DebugMemory.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/DebugMemory.h b/DebugMemory.h index 8261fee..16f4248 100644 --- a/DebugMemory.h +++ b/DebugMemory.h @@ -1,27 +1,27 @@ -/* Do not edit this file. It was automatically genarated. */ +/* Do not edit this file. It was automatically generated. */ #ifndef HEADER_DebugMemory #define HEADER_DebugMemory #define _GNU_SOURCE - +#include <string.h> #include <stdlib.h> #include <stdio.h> -#include <string.h> #include <stdbool.h> - #include <assert.h> - #undef strdup #undef malloc #undef realloc #undef calloc #undef free + + typedef struct DebugMemoryItem_ DebugMemoryItem; struct DebugMemoryItem_ { + int magic; void* data; char* file; int line; @@ -33,17 +33,20 @@ typedef struct DebugMemory_ { 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); +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); +void* DebugMemory_realloc(void* ptr, int size, char* file, int line, char* str); void* DebugMemory_strdup(char* str, char* file, int line); @@ -59,4 +62,10 @@ void DebugMemory_registerDeallocation(void* data, char* file, int line); void DebugMemory_report(); +#elif defined(DEBUGLITE) + +//#include "efence.h" + +#endif + #endif |