diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2011-03-22 20:37:08 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2011-03-22 20:37:08 +0000 |
commit | a9c0ea375323a3f801636f95a76afd0fd1328c5d (patch) | |
tree | 6c8f551197bc53097e4ab2618ca20eb1fe0f0696 /DebugMemory.c | |
parent | b56195663760d76ea61d9ed15121dd4a13fa68cd (diff) |
* Option for counting CPUs from zero
(thanks to Sean Noonan)
* Meters update in every screen (no longer halting while on Setup, etc.)
Diffstat (limited to 'DebugMemory.c')
-rw-r--r-- | DebugMemory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/DebugMemory.c b/DebugMemory.c index da2bf624..ff5b6988 100644 --- a/DebugMemory.c +++ b/DebugMemory.c @@ -90,7 +90,7 @@ void* DebugMemory_realloc(void* ptr, int size, char* file, int line, char* str) return data; } -void* DebugMemory_strdup(char* str, char* file, int line) { +void* DebugMemory_strdup(const char* str, char* file, int line) { assert(str); char* data = strdup(str); DebugMemory_registerAllocation(data, file, line); @@ -102,7 +102,7 @@ void* DebugMemory_strdup(char* str, char* file, int line) { } void DebugMemory_free(void* data, char* file, int line) { - assert(data); + if (!data) return; DebugMemory_registerDeallocation(data, file, line); if (singleton->file) { if (singleton->totals) fprintf(singleton->file, "%d\t", singleton->size); |