If you are talking about valgrind, I suggest that you are interested in Linux software.
With MTrace, you can easily create your own report for posting and freeing up space. It is not directly C ++, but directly integrated into GlibC. As far as I know, new C ++ operators and operators use this to allocate memory before calling the constructor and freeing memory after calling the destructor.
source share