简体   繁体   中英

How to find memory leaks in a task in RTOS?

我在 RTOS 和内部任务中有一个任务,例如我分配了 5 次内存并释放了 3 次内存,但是如何在不使用外部工具的情况下找到内存泄漏?

I don't think FreeRTOS maintains task ownership of allocations (a quick read of heap_2.c in a random local working directory supports this), so that sounds impossible.

There might be hooks that let you add this on your own, see the traceMALLOC() and traceFREE() macros.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM