pike.git / src / block_allocator.c

version» Context lines:

pike.git/src/block_allocator.c:567:    p->prev = NULL;    p->next = NULL;    p->first = NULL;    p->used = a->blocks;    }       if (a->first) {   #ifdef BA_DEBUG    if (!a->first->first) {    ba_show_pages(a); -  BA_ERROR("no free blk in page %p\n", a->first); +  BA_ERROR("no free blk in page %lx\n", (long int)a->first);    }   #endif    a->first->prev = NULL;    } else if (a->empty_pages) {    a->last = a->first = a->empty;    a->empty = a->empty->next;    a->empty_pages--;    a->first->next = NULL;    } else ba_alloc_page(a);   
pike.git/src/block_allocator.c:667: Inside #if defined(BA_DEBUG)
  #endif   #ifdef BA_DEBUG    fprintf(stderr, "magnitude: %u\n", a->magnitude);    fprintf(stderr, "allocated: %u\n", a->allocated);    fprintf(stderr, "did not find %p (%X[%X] | %X[%X])\n", ptr,    hash1(a, ptr), hash1(a, ptr) & BA_HASH_MASK(a),    hash2(a, ptr), hash2(a, ptr) & BA_HASH_MASK(a)    );    ba_print_htable(a);   #endif -  BA_ERROR("Unknown pointer (not found in hash) %p\n", ptr); +  BA_ERROR("Unknown pointer (not found in hash) %lx\n", (long int)ptr);   }         PMOD_EXPORT void ba_remove_page(struct block_allocator * a,    ba_page p) {   #ifdef BA_DEBUG    ba_check_allocator(a, "ba_remove_page", __FILE__, __LINE__);    if (a->empty_pages < a->max_empty_pages) {    BA_ERROR("strange things happening\n");    }