git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Usermode/dhcpclient - A little cleanup
[tpg/acess2.git]
/
Usermode
/
Libraries
/
libc.so_src
/
heap.c
diff --git
a/Usermode/Libraries/libc.so_src/heap.c
b/Usermode/Libraries/libc.so_src/heap.c
index
779b004
..
bdf64de
100644
(file)
--- a/
Usermode/Libraries/libc.so_src/heap.c
+++ b/
Usermode/Libraries/libc.so_src/heap.c
@@
-185,7
+185,7
@@
EXPORT void free(void *mem)
DEBUGS("free(%p) : 0x%x bytes", mem, head->size);
\r
\r
//Unify Right
\r
DEBUGS("free(%p) : 0x%x bytes", mem, head->size);
\r
\r
//Unify Right
\r
- if((
intptr_t)head + head->size < (
intptr_t)_heap_end)
\r
+ if((
uintptr_t)head + head->size < (u
intptr_t)_heap_end)
\r
{
\r
heap_head *nextHead = (heap_head*)((intptr_t)head + head->size);
\r
if(nextHead->magic == MAGIC_FREE) { //Is the next block free
\r
{
\r
heap_head *nextHead = (heap_head*)((intptr_t)head + head->size);
\r
if(nextHead->magic == MAGIC_FREE) { //Is the next block free
\r
@@
-194,7
+194,7
@@
EXPORT void free(void *mem)
}
\r
}
\r
//Unify Left
\r
}
\r
}
\r
//Unify Left
\r
- if((
intptr_t)head - sizeof(heap_foot) > (
intptr_t)_heap_start)
\r
+ if((
uintptr_t)head - sizeof(heap_foot) > (u
intptr_t)_heap_start)
\r
{
\r
heap_head *prevHead;
\r
heap_foot *prevFoot = (heap_foot *)((intptr_t)head - sizeof(heap_foot));
\r
{
\r
heap_head *prevHead;
\r
heap_foot *prevFoot = (heap_foot *)((intptr_t)head - sizeof(heap_foot));
\r
@@
-448,7
+448,7
@@
LOCAL uint brk(uintptr_t newpos)
void Heap_Dump(void)
\r
{
\r
heap_head *cur = _heap_start;
\r
void Heap_Dump(void)
\r
{
\r
heap_head *cur = _heap_start;
\r
- while( cur < _heap_end )
\r
+ while( cur <
(heap_head*)
_heap_end )
\r
{
\r
switch( cur->magic )
\r
{
\r
{
\r
switch( cur->magic )
\r
{
\r
UCC
git Repository :: git.ucc.asn.au