mirror of
https://github.com/apache/nuttx.git
synced 2025-12-16 01:34:58 +08:00
mm:Fix the problem that the memdump statistics of blkcont are inconsistent
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
This commit is contained in:
@@ -296,7 +296,8 @@ static void mallinfo_task_handler(FAR void *ptr, size_t size, int used,
|
||||
FAR struct memdump_backtrace_s *buf =
|
||||
ptr + size - sizeof(struct memdump_backtrace_s);
|
||||
|
||||
if ((task->pid == PID_MM_ALLOC || task->pid == buf->pid ||
|
||||
if ((task->pid == buf->pid ||
|
||||
(task->pid == PID_MM_ALLOC && buf->pid != PID_MM_MEMPOOL) ||
|
||||
(task->pid == PID_MM_LEAK && !!nxsched_get_tcb(buf->pid))) &&
|
||||
buf->seqno >= task->seqmin && buf->seqno <= task->seqmax)
|
||||
{
|
||||
@@ -408,7 +409,9 @@ static void memdump_handler(FAR void *ptr, size_t size, int used,
|
||||
FAR struct memdump_backtrace_s *buf =
|
||||
ptr + size - sizeof(struct memdump_backtrace_s);
|
||||
|
||||
if ((dump->pid == PID_MM_ALLOC || dump->pid == buf->pid) &&
|
||||
if ((dump->pid == buf->pid ||
|
||||
(dump->pid == PID_MM_ALLOC && buf->pid != PID_MM_MEMPOOL) ||
|
||||
(dump->pid == PID_MM_LEAK && !!nxsched_get_tcb(buf->pid))) &&
|
||||
buf->seqno >= dump->seqmin && buf->seqno <= dump->seqmax)
|
||||
#endif
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user