pike.git / src / block_allocator.c

version» Context lines:

pike.git/src/block_allocator.c:590: Inside #if defined(PIKE_DEBUG)
   it.end = ((char*)BA_LASTBLOCK(it.l, p) + it.l.block_size);   #ifdef PIKE_DEBUG    if ((char*)it.end < (char*)it.cur)    Pike_fatal("Free list not sorted in ba_walk.\n");   #endif    if ((char*)it.end != (char*)it.cur) {    cb(&it, data);    }    break;    } else if (free_block == BA_ONE) { -  /* all consecutive blocks are free, so we are dont */ +  /* all consecutive blocks are free, so we are done. */    break;    }       it.end = free_block;       PIKE_MEMPOOL_ALLOC(a, free_block, it.l.block_size);    PIKE_MEM_RW_RANGE(free_block, sizeof(struct ba_block_header));    {    struct ba_block_header *tmp = free_block->next;    PIKE_MEMPOOL_FREE(a, free_block, it.l.block_size);
pike.git/src/block_allocator.c:616:    Pike_fatal("Free list not sorted in ba_walk.\n");   #endif    if ((char*)it.end != (char*)it.cur) {   #ifdef PIKE_DEBUG    ba_check_ptr(a, i, it.cur, NULL, __LINE__);    ba_check_ptr(a, i, (char*)it.end - it.l.block_size, NULL, __LINE__);   #endif    cb(&it, data);    }    -  it.cur = (char*)it.end + it.l.block_size; +  it.cur = (char*)it.cur + it.l.block_size;    }       /* if the callback throws, this will never happen */    p->h.used--;    }    ba_double_layout(&it.l);    }       /* during the iteration blocks might have been freed. The pages will still be there, so we might have    * to do some cleanup. */    if (!a->pages[a->size-1]->h.used)    ba_free_empty_pages(a);   }