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:
Bart Oldeman 2004-03-17 22:06:57 +00:00
parent 329c7c6e6a
commit aeec36ea4b
1 changed files with 2 additions and 2 deletions

View File

@ -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 */