SWAP_BLOCK_PAGES
swap_addr_t swap_slots[SWAP_BLOCK_PAGES];
for (uint32 i = 0; i < SWAP_BLOCK_PAGES; i++)
for (j = 0; blockIndex < SWAP_BLOCK_PAGES && left > 0; j++) {
for (j = 0; blockIndex < SWAP_BLOCK_PAGES && left > 0; j++) {
& ~(off_t)(B_PAGE_SIZE * SWAP_BLOCK_PAGES - 1);
offset += B_PAGE_SIZE * SWAP_BLOCK_PAGES) {
for (uint32 i = 0; i < SWAP_BLOCK_PAGES; i++) {
for (uint32 i = 0; i < SWAP_BLOCK_PAGES; i++) {
for (uint32 i = 0; i < SWAP_BLOCK_PAGES; i++) {
pageIndex = ROUNDUP(pageIndex + 1, SWAP_BLOCK_PAGES) - 1;
pageIndex = ROUNDUP(pageIndex + 1, SWAP_BLOCK_PAGES) - 1;
= SWAP_BLOCK_PAGES - (sourcePageIndex & SWAP_BLOCK_MASK);
for (uint32 i = 0; i < SWAP_BLOCK_PAGES; i++)
#define SWAP_BLOCK_MASK (SWAP_BLOCK_PAGES - 1)