gallium: State when there are no memory leaks detected.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Thu, 13 Nov 2008 11:34:10 +0000 (20:34 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Mon, 17 Nov 2008 03:36:07 +0000 (12:36 +0900)
src/gallium/auxiliary/util/p_debug_mem.c

index 9511479..250fd60 100644 (file)
@@ -265,6 +265,9 @@ debug_memory_end(unsigned long start_no)
    size_t total_size = 0;
    struct list_head *entry;
 
+   if(start_no == last_no)
+      return;
+
    entry = list.prev;
    for (; entry != &list; entry = entry->prev) {
       struct debug_memory_header *hdr;
@@ -302,4 +305,7 @@ debug_memory_end(unsigned long start_no)
       debug_printf("Total of %u KB of system memory apparently leaked\n",
                   (total_size + 1023)/1024);
    }
+   else {
+      debug_printf("No memory leaks detected.\n");
+   }
 }