mm: mm_threshold perfer from init

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
buxiasen 2024-06-24 11:11:01 +08:00 committed by Xiang Xiao
parent c8f18767de
commit 756d9508bc
2 changed files with 2 additions and 2 deletions

View File

@ -325,7 +325,7 @@ mm_initialize_pool(FAR const char *name,
if (init != NULL && init->poolsize != NULL && init->npools != 0)
{
heap->mm_threshold = CONFIG_MM_HEAP_MEMPOOL_THRESHOLD;
heap->mm_threshold = init->threshold;
heap->mm_mpool = mempool_multiple_init(name, init->poolsize,
init->npools,
(mempool_multiple_alloc_t)mempool_memalign,

View File

@ -947,7 +947,7 @@ mm_initialize_pool(FAR const char *name,
if (init != NULL && init->poolsize != NULL && init->npools != 0)
{
heap->mm_threshold = CONFIG_MM_HEAP_MEMPOOL_THRESHOLD;
heap->mm_threshold = init->threshold;
heap->mm_mpool = mempool_multiple_init(name, init->poolsize,
init->npools,
(mempool_multiple_alloc_t)mempool_memalign,