mm/heap: Skip memset backtrace buffer
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
70ecb4ef26
commit
54de894e52
@ -88,8 +88,11 @@
|
|||||||
tcb = nxsched_get_tcb(tmp->pid); \
|
tcb = nxsched_get_tcb(tmp->pid); \
|
||||||
if ((heap)->mm_procfs.backtrace || (tcb && tcb->flags & TCB_FLAG_HEAP_DUMP)) \
|
if ((heap)->mm_procfs.backtrace || (tcb && tcb->flags & TCB_FLAG_HEAP_DUMP)) \
|
||||||
{ \
|
{ \
|
||||||
memset(tmp->backtrace, 0, sizeof(tmp->backtrace)); \
|
int n = backtrace(tmp->backtrace, CONFIG_MM_BACKTRACE); \
|
||||||
backtrace(tmp->backtrace, CONFIG_MM_BACKTRACE); \
|
if (n < CONFIG_MM_BACKTRACE) \
|
||||||
|
{ \
|
||||||
|
tmp->backtrace[n] = 0; \
|
||||||
|
} \
|
||||||
} \
|
} \
|
||||||
else \
|
else \
|
||||||
{ \
|
{ \
|
||||||
|
Loading…
Reference in New Issue
Block a user