Search the free list in a circle starting at the last place visited.
If we loop completely around without finding a large enough
space we will have to get more memory from the system. */
- blocks = BLOCKIFY(size);
- start = block = MALLOC_SEARCH_START;
+ size_t blocks = BLOCKIFY(size);
+ size_t start = block = MALLOC_SEARCH_START;
while (mdp->heapinfo[block].free_block.size < blocks) {
if (mdp->heapinfo[block].type >=0) { // Don't trust xbt_die and friends in malloc-level library, you fool!
fprintf(stderr,"Internal error: found a free block not marked as such (block=%lu type=%lu). Please report this bug.\n",(unsigned long)block,(unsigned long)mdp->heapinfo[block].type);