git.ucc.asn.au
/
tpg
/
acess2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fe24894
)
Kernel - Fixed heap debug issue with valid side not being set
author
John Hodge
<
[email protected]
>
Sun, 5 Jun 2011 16:20:33 +0000
(
00:20
+0800)
committer
John Hodge
<
[email protected]
>
Sun, 5 Jun 2011 16:20:33 +0000
(
00:20
+0800)
Kernel/heap.c
patch
|
blob
|
history
diff --git
a/Kernel/heap.c
b/Kernel/heap.c
index
ea32436
..
262053b
100644
(file)
--- a/
Kernel/heap.c
+++ b/
Kernel/heap.c
@@
-211,6
+211,7
@@
void *Heap_Allocate(const char *File, int Line, size_t __Bytes)
head->Magic = MAGIC_USED;
head->File = File;
head->Line = Line;
head->Magic = MAGIC_USED;
head->File = File;
head->Line = Line;
+ head->ValidSize = __Bytes;
Mutex_Release(&glHeap); // Release spinlock
#if DEBUG_TRACE
Log("[Heap ] Malloc'd %p (%i bytes), returning to %p", head->Data, head->Size, __builtin_return_address(0));
Mutex_Release(&glHeap); // Release spinlock
#if DEBUG_TRACE
Log("[Heap ] Malloc'd %p (%i bytes), returning to %p", head->Data, head->Size, __builtin_return_address(0));
@@
-246,6
+247,7
@@
void *Heap_Allocate(const char *File, int Line, size_t __Bytes)
best->Magic = MAGIC_USED; // Mark block as used
best->File = File;
best->Line = Line;
best->Magic = MAGIC_USED; // Mark block as used
best->File = File;
best->Line = Line;
+ head->ValidSize = __Bytes;
Mutex_Release(&glHeap); // Release spinlock
#if DEBUG_TRACE
Log("[Heap ] Malloc'd %p (%i bytes), returning to %p", best->Data, best->Size, __builtin_return_address(0));
Mutex_Release(&glHeap); // Release spinlock
#if DEBUG_TRACE
Log("[Heap ] Malloc'd %p (%i bytes), returning to %p", best->Data, best->Size, __builtin_return_address(0));
UCC
git Repository :: git.ucc.asn.au