Simple C implementation to track memory malloc/free?

后端 未结 7 1480
情歌与酒
情歌与酒 2020-12-01 13:32

programming language: C platform: ARM Compiler: ADS 1.2

I need to keep track of simple melloc/free calls in my project. I just need to get very basic id

7条回答
  •  不思量自难忘°
    2020-12-01 13:59

    I would use rmalloc. It is a simple library (actually it is only two files) to debug memory usage, but it also has support for statistics. Since you already wrapper functions it should be very easy to use rmalloc for it. Keep in mind that you also need to replace strdup, etc.

提交回复
热议问题