mirror of https://github.com/FDOS/kernel.git
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));
|
||||
next = (block *)(&akt->data[akt->length & ~BUSY]);
|
||||
if (next == ltop || isbusy(akt))
|
||||
if (isbusy(akt))
|
||||
{
|
||||
akt = next; /* next block */
|
||||
}
|
||||
else if (isbusy(next))
|
||||
else if (next == ltop || isbusy(next))
|
||||
{
|
||||
size_t size = akt->length;
|
||||
if (size >= length) /* try to split */
|
||||
|
|
Loading…
Reference in New Issue