mirror of
https://github.com/FDOS/kernel.git
synced 2025-07-15 09:54:27 +02:00
talloc fix from Lucho
git-svn-id: https://svn.code.sf.net/p/freedos/svn/kernel/trunk@801 6ac86273-5f31-0410-b378-82cca8765d1b
This commit is contained in:
parent
329c7c6e6a
commit
aeec36ea4b
@ -83,11 +83,11 @@ void *malloc(size_t length)
|
|||||||
}
|
}
|
||||||
dbprintf(("follow [%x] = %x\n",akt, akt->length));
|
dbprintf(("follow [%x] = %x\n",akt, akt->length));
|
||||||
next = (block *)(&akt->data[akt->length & ~BUSY]);
|
next = (block *)(&akt->data[akt->length & ~BUSY]);
|
||||||
if (next == ltop || isbusy(akt))
|
if (isbusy(akt))
|
||||||
{
|
{
|
||||||
akt = next; /* next block */
|
akt = next; /* next block */
|
||||||
}
|
}
|
||||||
else if (isbusy(next))
|
else if (next == ltop || isbusy(next))
|
||||||
{
|
{
|
||||||
size_t size = akt->length;
|
size_t size = akt->length;
|
||||||
if (size >= length) /* try to split */
|
if (size >= length) /* try to split */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user