From 756d9508bc0d58d2b5812a05c6200e3a37181320 Mon Sep 17 00:00:00 2001 From: buxiasen Date: Mon, 24 Jun 2024 11:11:01 +0800 Subject: [PATCH] mm: mm_threshold perfer from init Signed-off-by: buxiasen --- mm/mm_heap/mm_initialize.c | 2 +- mm/tlsf/mm_tlsf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/mm_heap/mm_initialize.c b/mm/mm_heap/mm_initialize.c index 86c13c5153..9ceb518346 100644 --- a/mm/mm_heap/mm_initialize.c +++ b/mm/mm_heap/mm_initialize.c @@ -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, diff --git a/mm/tlsf/mm_tlsf.c b/mm/tlsf/mm_tlsf.c index 32e9aa14cb..444f9ad839 100644 --- a/mm/tlsf/mm_tlsf.c +++ b/mm/tlsf/mm_tlsf.c @@ -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,