X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Fheap.c;h=be8eeaf6e3b4dc06945d84a499e4c4f4bcc63000;hb=ea487239a8b3632d13c6e4ec92d21f0fcd460bdd;hp=af2bde490db70be918e1a3ab5a423cbe023ca5d8;hpb=603cb55f1a4c20d28b8d4487d5bab032c8d47036;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/heap.c b/KernelLand/Kernel/heap.c index af2bde49..be8eeaf6 100644 --- a/KernelLand/Kernel/heap.c +++ b/KernelLand/Kernel/heap.c @@ -512,7 +512,12 @@ void Heap_Dump(void) { tHeapHead *head, *badHead; tHeapFoot *foot = NULL; + static int in_heap_dump; + if( in_heap_dump ) return; + + in_heap_dump = 1; + head = gHeapStart; while( (Uint)head < (Uint)gHeapEnd ) { @@ -560,12 +565,16 @@ void Heap_Dump(void) } // If the heap is valid, ok! - if( (tVAddr)head == (tVAddr)gHeapEnd ) + if( (tVAddr)head == (tVAddr)gHeapEnd ) { + in_heap_dump = 0; return ; + } // Check for a bad return - if( (tVAddr)head >= (tVAddr)gHeapEnd ) + if( (tVAddr)head >= (tVAddr)gHeapEnd ) { + in_heap_dump = 0; return ; + } #if !VERBOSE_DUMP Log_Log("Heap", "%p (%P): 0x%08lx %i %4C",