From 6da7ee128b08b9eec5284e7532510674460d045c Mon Sep 17 00:00:00 2001 From: liangyingjian Date: Thu, 3 Nov 2022 00:24:47 +0800 Subject: [PATCH] =?UTF-8?q?[update]=E6=9B=B4=E6=AD=A3=20RT=5FMEMHEAP=5FBSE?= =?UTF-8?q?T=5FMODE=20->=20RT=5FMEMHEAP=5FBEST=5FMODE=20=E6=8B=BC=E5=86=99?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Kconfig | 2 +- src/memheap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Kconfig b/src/Kconfig index 4260585cd8..9e1a0eafc4 100644 --- a/src/Kconfig +++ b/src/Kconfig @@ -324,7 +324,7 @@ menu "Memory Management" Speed priority mode. As long as the memory block size meets the requirements, the search ends immediately. - config RT_MEMHEAP_BSET_MODE + config RT_MEMHEAP_BEST_MODE bool "best mode" help Best size first. diff --git a/src/memheap.c b/src/memheap.c index 85f4899116..62142af34d 100644 --- a/src/memheap.c +++ b/src/memheap.c @@ -690,7 +690,7 @@ void rt_memheap_free(void *ptr) if (insert_header) { struct rt_memheap_item *n = heap->free_list->next_free;; -#if defined(RT_MEMHEAP_BSET_MODE) +#if defined(RT_MEMHEAP_BEST_MODE) rt_size_t blk_size = MEMITEM_SIZE(header_ptr); for (;n != heap->free_list; n = n->next_free) {