Profiling memory leaks in Linux

You can use the same valgrind tool:

valgrind --tool=memcheck ./binary
memcheck is a memory error detector. It can detect the following problems that are common in C and C++ programs: On a modern machine, an L1 miss will typically cost around 10 cycles, and an L2 miss can cost as much as 200 cycles. Detailed cache profiling can be very useful for improving the performance of your program.