Kernel/VTerm - Fixed not changing VT resolution when default resolution is unavaliable
[tpg/acess2.git] / Kernel / heap.c
index fc99f56..e53f5b8 100644 (file)
@@ -197,7 +197,8 @@ void *Heap_Allocate(const char *File, int Line, size_t __Bytes)
                if(head->Magic != MAGIC_FREE)   {
                        Mutex_Release(&glHeap); // Release spinlock
                        #if WARNINGS
-                       Log_Warning("Heap", "Magic of heap address %p is invalid (0x%x)", head, head->Magic);
+                       Log_Warning("Heap", "Magic of heap address %p is invalid (%p = 0x%x)",
+                               head, &head->Magic, head->Magic);
                        Heap_Dump();
                        #endif
                        return NULL;
@@ -309,8 +310,8 @@ void Heap_Deallocate(void *Ptr)
        // Sanity check
        if((Uint)Ptr < (Uint)gHeapStart || (Uint)Ptr > (Uint)gHeapEnd)
        {
-               Log_Warning("Heap", "free - Passed a non-heap address (%p < %p < %p)\n",
-                       gHeapStart, Ptr, gHeapEnd);
+               Log_Warning("Heap", "free - Passed a non-heap address by %p (%p < %p < %p)\n",
+                       __builtin_return_address(0), gHeapStart, Ptr, gHeapEnd);
                return;
        }
        
@@ -519,8 +520,8 @@ void Heap_Dump(void)
        {               
                foot = (void*)( (Uint)head + head->Size - sizeof(tHeapFoot) );
                #if VERBOSE_DUMP
-               Log_Log("Heap", "%p (0x%llx): 0x%08lx (%i) %4C",
-                       head, MM_GetPhysAddr((Uint)head), head->Size, head->ValidSize, &head->Magic);
+               Log_Log("Heap", "%p (0x%P): 0x%08x (%i) %4C",
+                       head, MM_GetPhysAddr((tVAddr)head), head->Size, head->ValidSize, &head->Magic);
                Log_Log("Heap", "%p %4C", foot->Head, &foot->Magic);
                if(head->File) {
                        Log_Log("Heap", "%sowned by %s:%i",
@@ -572,7 +573,7 @@ void Heap_Dump(void)
        Log_Log("Heap", "%p (%P): 0x%08lx %i %4C",
                head, MM_GetPhysAddr((Uint)head), head->Size, head->ValidSize, &head->Magic);
        if(foot)
-               Log_Log("Heap", "Backlink = %p %4C", foot->Head, &foot->Magic);
+               Log_Log("Heap", "Foot %p = {Head:%p,Magic:%4C}", foot, foot->Head, &foot->Magic);
        if(head->File) {
                Log_Log("Heap", "%sowned by %s:%i",
                        (head->Magic==MAGIC_FREE?"was ":""), head->File, head->Line);

UCC git Repository :: git.ucc.asn.au