Commit fe2b9a8f authored by unknown's avatar unknown

Merge perch.ndb.mysql.com:/home/jonas/src/41-work

into  perch.ndb.mysql.com:/home/jonas/src/50-work

parents f3606fa8 42fd7e8f
......@@ -184,24 +184,28 @@ void Dbtup::allocConsPages(Uint32 noOfPagesToAllocate,
/* PROPER AMOUNT OF PAGES WERE NOT FOUND. FIND AS MUCH AS */
/* POSSIBLE. */
/* ---------------------------------------------------------------- */
for (Uint32 j = firstListToCheck; (Uint32)~j; j--) {
if (firstListToCheck)
{
ljam();
if (cfreepageList[j] != RNIL) {
for (Uint32 j = firstListToCheck - 1; (Uint32)~j; j--) {
ljam();
if (cfreepageList[j] != RNIL) {
ljam();
/* ---------------------------------------------------------------- */
/* SOME AREA WAS FOUND, ALLOCATE ALL OF IT. */
/* ---------------------------------------------------------------- */
allocPageRef = cfreepageList[j];
removeCommonArea(allocPageRef, j);
noOfPagesAllocated = 1 << j;
findFreeLeftNeighbours(allocPageRef, noOfPagesAllocated,
noOfPagesToAllocate);
findFreeRightNeighbours(allocPageRef, noOfPagesAllocated,
noOfPagesToAllocate);
return;
}//if
}//for
allocPageRef = cfreepageList[j];
removeCommonArea(allocPageRef, j);
noOfPagesAllocated = 1 << j;
findFreeLeftNeighbours(allocPageRef, noOfPagesAllocated,
noOfPagesToAllocate);
findFreeRightNeighbours(allocPageRef, noOfPagesAllocated,
noOfPagesToAllocate);
return;
}//if
}//for
}
/* ---------------------------------------------------------------- */
/* NO FREE AREA AT ALL EXISTED. RETURN ZERO PAGES */
/* ---------------------------------------------------------------- */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment