From c08e194db676bd9dcd0f43bacf2051c7c91a62df Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 16 Apr 2008 19:47:21 +0200 Subject: [PATCH 1/1] smalloc: remember to account for sizeof block header Signed-off-by: Jens Axboe --- smalloc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/smalloc.c b/smalloc.c index 28f82633..8d1193ab 100644 --- a/smalloc.c +++ b/smalloc.c @@ -231,6 +231,7 @@ static int add_pool(struct pool *pool, unsigned int alloc_size) if (fd < 0) goto out_close; + alloc_size += sizeof(*hdr); if (alloc_size > smalloc_pool_size) pool->size = alloc_size; else -- 2.25.1