Browse Source

add guards for MEM_TRACE inside free(), too

Ioannis Koutras 12 years ago
parent
commit
a417feaf2d
1 changed files with 6 additions and 0 deletions
  1. 6 0
      src/free.c

+ 6 - 0
src/free.c

@@ -41,7 +41,13 @@ void free(void *ptr) {
         return;
     }
 
+#if defined PARSE_ENV && defined WITH_MEM_TRACE
+    if(__builtin_expect (systemallocator.initialized, true)) {
+#endif /* PARSE_ENV && WITH_MEM_TRACE */
     MEM_TRACE("dmmlib - f %p\n", ptr);
+#if defined PARSE_ENV && defined WITH_MEM_TRACE
+    }
+#endif /* PARSE_ENV && WITH_MEM_TRACE */
 
     owner_raw_block = find_raw_block_owner(systemallocator.rb_head, ptr);