[英]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.我不认为 FreeRTOS 维护分配的任务所有权(在随机本地工作目录中快速阅读
heap_2.c
支持这一点),所以这听起来不可能。
There might be hooks that let you add this on your own, see the traceMALLOC()
and traceFREE()
macros.可能有一些钩子可以让您自己添加它,请参阅
traceMALLOC()
和traceFREE()
宏。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.