Permalink
Browse files

Properly compare mem_num_malloced == mem_num_freed

Of course we want to compare the number of mallocs with the number of freed memory, and not the number of mallocs with itself ;-)
  • Loading branch information...
naoliv committed Sep 28, 2017
1 parent de7f920 commit 94b6918179f5a40c229e18172ef3bfa87f85afa6
Showing with 1 addition and 1 deletion.
  1. +1 −1 mem.c
View
2 mem.c
@@ -114,7 +114,7 @@ static MEMINFO *meminfo_getinfo(void *p) {
static void print_memory_stats(void) {
size_t i;
if(mem_num_malloced == mem_num_malloced
if(mem_num_malloced == mem_num_freed
&& mem_bytes_malloced == mem_bytes_freed)
return;

0 comments on commit 94b6918

Please sign in to comment.