Lines Matching refs:alloc_size
181 static int add_pool(struct pool *pool, unsigned int alloc_size) in add_pool() argument
188 alloc_size += sizeof(unsigned int); in add_pool()
190 alloc_size += sizeof(struct block_hdr); in add_pool()
191 if (alloc_size < INITIAL_SIZE) in add_pool()
192 alloc_size = INITIAL_SIZE; in add_pool()
195 alloc_size = (alloc_size + SMALLOC_BPL - 1) & ~(SMALLOC_BPL - 1); in add_pool()
196 bitmap_blocks = alloc_size / SMALLOC_BPL; in add_pool()
197 alloc_size += bitmap_blocks * sizeof(unsigned int); in add_pool()
198 pool->mmap_size = alloc_size; in add_pool()
209 ptr = mmap(NULL, alloc_size, PROT_READ|PROT_WRITE, mmap_flags, -1, 0); in add_pool()
214 memset(ptr, 0, alloc_size); in add_pool()
427 size_t alloc_size = size + sizeof(struct block_hdr); in smalloc_pool() local
435 alloc_size += sizeof(unsigned int); in smalloc_pool()
436 alloc_size = (alloc_size + int_mask) & ~int_mask; in smalloc_pool()
439 ptr = __smalloc_pool(pool, alloc_size); in smalloc_pool()
443 hdr->size = alloc_size; in smalloc_pool()