How can I benchmark malloc implementations?
I am comparing between different malloc implementations and I would like to compare their run time and memory usage. In particular, I am interested in the runtime and in the maximum resident memory. It is important that the maximum resident memory will be the real one (without the code segment etc.). I cannot us开发者_JAVA技巧e tools like valgrind, since it replaces the malloc implementation. Also, I run the tests on programs that I have not written, and I prefer not to change their source code.
You can use rdtscbench for the runtime measurement. See:
https://github.com/petersenna/rdtscbench
精彩评论