pool->mmap_size = alloc_size;
pool->nr_blocks = bitmap_blocks;
- pool->free_blocks = bitmap_blocks * SMALLOC_BPB;
+ pool->free_blocks = bitmap_blocks * SMALLOC_BPI;
mmap_flags = OS_MAP_ANON;
#ifdef CONFIG_ESX
if (hdr->prered != SMALLOC_PRE_RED) {
log_err("smalloc pre redzone destroyed!\n"
" ptr=%p, prered=%x, expected %x\n",
- hdr, hdr->prered, SMALLOC_PRE_RED);
+ hdr+1, hdr->prered, SMALLOC_PRE_RED);
assert(0);
}
if (*postred != SMALLOC_POST_RED) {
log_err("smalloc post redzone destroyed!\n"
" ptr=%p, postred=%x, expected %x\n",
- hdr, *postred, SMALLOC_POST_RED);
+ hdr+1, *postred, SMALLOC_POST_RED);
assert(0);
}
}