I would like the count the number of malloc calls in a large C++ project.
- I tried malloc hooks but learned that they were removed.
- Valgrind Massif tells me how much memory is allocated but I not the number of calls to malloc. Or is there a way to get this data?
- I could preload a library which replaces malloc. But I could not really find a tutorial on how to do this exactly.
Any quick and easy approach to counting the number of malloc calls would be appreciated!