3 ms·
You could easily do this on Linux, where the executable format allows you to override library-defined symbols, including malloc(). Implement the new malloc/call
by pmjordan 15y ago
You could easily do this on Linux, where the executable format allows you to override library-defined symbols, including malloc(). Implement the new malloc/calloc/realloc/free as a static library and link it to your dev builds. Don't link it for releases.
Or just use valgrind, if you can.
- piotrSikora 15y agoYou seem to miss the difference between "developer testing his/her app" and "everyone testing every app". To the point, I'm using "/etc/malloc.conf -> AFGJPRX" on most of my systems, which means that virtually everything that runs there is checked. Can you easily do that on Linux? How many apps are you running via valgrind on a daily basis?