From 2ab2b815defe8dad0d15ecfa79dbfdff8acccb5e Mon Sep 17 00:00:00 2001 From: John Hodge Date: Mon, 21 Sep 2009 17:27:32 +0800 Subject: [PATCH] Disabled debug in binary.c, added debug statement to free() --- Kernel/Makefile | 2 +- Kernel/binary.c | 2 +- Kernel/heap.c | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Kernel/Makefile b/Kernel/Makefile index 0c900229..de3c071c 100644 --- a/Kernel/Makefile +++ b/Kernel/Makefile @@ -45,7 +45,7 @@ $(BIN): $(OBJ) arch/$(ARCHDIR)/link.ld Makefile @objdump $(BIN) -D > $(BIN).dsm @cp $(BIN) /mnt/AcessFDD/ @wc -l $(SRCFILES) > LineCounts.$(ARCH).txt - @git commit + @git commit -a %.ao.$(ARCH): %.asm Makefile @echo --- NASM -o $@ diff --git a/Kernel/binary.c b/Kernel/binary.c index 7175799b..46d086c0 100644 --- a/Kernel/binary.c +++ b/Kernel/binary.c @@ -5,7 +5,7 @@ #include #include -#define DEBUG 1 +#define DEBUG 0 #if DEBUG #else diff --git a/Kernel/heap.c b/Kernel/heap.c index fce510cd..e5a37232 100644 --- a/Kernel/heap.c +++ b/Kernel/heap.c @@ -234,6 +234,9 @@ void free(void *Ptr) tHeapHead *head; tHeapFoot *foot; + LOG("Ptr = %p", Ptr); + LOG("Returns to %p", __builtin_return_address(0)); + // Alignment Check if( (Uint)Ptr & (sizeof(Uint)-1) ) { Warning("free - Passed a non-aligned address (%p)\n", Ptr); -- 2.20.1