mm/heap: Skip memset backtrace buffer

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-01-06 01:28:30 +08:00 committed by Petro Karashchenko
parent 70ecb4ef26
commit 54de894e52
1 changed files with 5 additions and 2 deletions

View File

@ -88,8 +88,11 @@
tcb = nxsched_get_tcb(tmp->pid); \
if ((heap)->mm_procfs.backtrace || (tcb && tcb->flags & TCB_FLAG_HEAP_DUMP)) \
{ \
memset(tmp->backtrace, 0, sizeof(tmp->backtrace)); \
backtrace(tmp->backtrace, CONFIG_MM_BACKTRACE); \
int n = backtrace(tmp->backtrace, CONFIG_MM_BACKTRACE); \
if (n < CONFIG_MM_BACKTRACE) \
{ \
tmp->backtrace[n] = 0; \
} \
} \
else \
{ \