From 8101978765b56257b7d4418a662b35e2fc835259 Mon Sep 17 00:00:00 2001 From: dongjiuzhu1 Date: Tue, 17 Jan 2023 10:47:14 +0800 Subject: [PATCH] arch/sim: fix compile break when using mallinfo_task with custom mm manager /usr/bin/ld: nuttx.rel: in function `mallinfo_task': nuttx/mm/umm_heap/umm_mallinfo.c:67: undefined reference to `mm_mallinfo_task' Signed-off-by: dongjiuzhu1 --- arch/sim/src/sim/sim_heap.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/sim/src/sim/sim_heap.c b/arch/sim/src/sim/sim_heap.c index 62d86842d6..66e5fe1380 100644 --- a/arch/sim/src/sim/sim_heap.c +++ b/arch/sim/src/sim/sim_heap.c @@ -388,6 +388,21 @@ int mm_mallinfo(struct mm_heap_s *heap, struct mallinfo *info) return 0; } +/**************************************************************************** + * Name: mm_mallinfo_task + * + * Description: + * mallinfo_task returns a copy of updated current task's heap information. + * + ****************************************************************************/ + +int mm_mallinfo_task(struct mm_heap_s *heap, struct mallinfo_task *info) +{ + info->aordblks = 0; + info->uordblks = 0; + return 0; +} + /**************************************************************************** * Name: mm_memdump *