X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=smalloc.c;h=23243054ec7ab401ee7d89d73db81d3d809dd612;hb=c16dc793a3c45780f67ce65244b6e91323dee014;hp=39bf47a5e00aca499f0af9edf75adc246ff8186c;hpb=247aa73ad08ff4c2202878e7e4f0485403c7e97e;p=fio.git diff --git a/smalloc.c b/smalloc.c index 39bf47a5..23243054 100644 --- a/smalloc.c +++ b/smalloc.c @@ -173,7 +173,7 @@ static bool add_pool(struct pool *pool, unsigned int alloc_size) 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 @@ -283,13 +283,13 @@ static void sfree_check_redzone(struct block_hdr *hdr) 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); } }