mempool: add the minimum size configuration of mempool

The minimum size of mempool can be configured through CONFIG_MM_MPOOL_MINISIZE

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
This commit is contained in:
liwenxiang1
2024-05-06 21:42:49 +08:00
committed by Xiang Xiao
parent 821196eb22
commit 015a45517e
3 changed files with 18 additions and 3 deletions
+4
View File
@@ -1021,7 +1021,11 @@ mm_initialize_pool(FAR const char *name,
for (i = 0; i < MEMPOOL_NPOOLS; i++)
{
# if CONFIG_MM_MIN_BLKSIZE != 0
poolsize[i] = (i + 1) * CONFIG_MM_MIN_BLKSIZE;
# else
poolsize[i] = (i + 1) * tlsf_align_size();
# endif
}
def.poolsize = poolsize;