From: José Fonseca Date: Thu, 13 Nov 2008 11:34:10 +0000 (+0900) Subject: gallium: State when there are no memory leaks detected. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e35d92953207dd5e40be4954ccc9015913f7f06;p=mesa.git gallium: State when there are no memory leaks detected. --- diff --git a/src/gallium/auxiliary/util/p_debug_mem.c b/src/gallium/auxiliary/util/p_debug_mem.c index 9511479cbbe..250fd60f634 100644 --- a/src/gallium/auxiliary/util/p_debug_mem.c +++ b/src/gallium/auxiliary/util/p_debug_mem.c @@ -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"); + } }