X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Fheap.c;h=6d099b33b1d2a9c30d1cb6e8cc43e80dc07abc22;hb=dd2491a82880ed9b01b5d66b1814d271921797a4;hp=6915d34855ce205c115ba79d8402c27c15c1c6a3;hpb=680c5d97a936963c62796dcae2d3a434a9a18ddf;p=tpg%2Facess2.git diff --git a/Kernel/heap.c b/Kernel/heap.c index 6915d348..6d099b33 100644 --- a/Kernel/heap.c +++ b/Kernel/heap.c @@ -49,7 +49,6 @@ void Heap_Install(void) } /** - * \fn void *Heap_Extend(int Bytes) * \brief Extend the size of the heap */ void *Heap_Extend(int Bytes) @@ -97,7 +96,6 @@ void *Heap_Extend(int Bytes) } /** - * \fn void *Heap_Merge(tHeapHead *Head) * \brief Merges two ajacent heap blocks */ void *Heap_Merge(tHeapHead *Head) @@ -142,10 +140,9 @@ void *Heap_Merge(tHeapHead *Head) } /** - * \brief Allocate memory from the heap * \param File Allocating source file * \param Line Source line - * \param Bytes Size of region to allocate + * \param __Bytes Size of region to allocate */ void *Heap_Allocate(const char *File, int Line, size_t __Bytes) { @@ -216,7 +213,8 @@ void *Heap_Allocate(const char *File, int Line, size_t __Bytes) head->AllocateTime = now(); Mutex_Release(&glHeap); // Release spinlock #if DEBUG_TRACE - Debug("[Heap ] Malloc'd %p (%i bytes), returning to %p", head->Data, head->Size, __builtin_return_address(0)); + Debug("[Heap ] Malloc'd %p (%i bytes), returning to %p", + head->Data, head->Size, __builtin_return_address(0)); #endif return head->Data; } @@ -285,7 +283,6 @@ void *Heap_Allocate(const char *File, int Line, size_t __Bytes) } /** - * \fn void Heap_Deallocate(void *Ptr) * \brief Free an allocated memory block */ void Heap_Deallocate(void *Ptr) @@ -310,8 +307,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; }