I've taken a course about low level programming and as part of it we're tasked with developing our own version of malloc, free and realloc. The functions and the underlying algorithms are done and now i'm supposed to do a fairly detailed performance comparison between the system version and my own.
What i'm wondering is how would you go about profiling (both memory and cpu) these functions? I've looked a bit at both valgrind (i can't seem to get enough detail over time since my performance program exits too quickly) and gperftools (that seems to replace malloc with their own functions).
Any tips?