I would like the see the source code for libmymalloc.so, however, I don't see anything in the blog post. Nor do I see anything in his GitHub profile: https://github.com/jsikstro
Also, I cannot find his email address anywhere (to ask him to share it on GitHub).
Am I missing something?
joelsiks•34m ago
The exact implementation of mymalloc isn't relevant to the post. I have an old allocator published at https://github.com/joelsiks/jsmalloc that I did as part of my Master's thesis, which uses a similar debug-logging mechanism that is described in the post.
throwaway2037•44m ago
Also, I cannot find his email address anywhere (to ask him to share it on GitHub).
Am I missing something?
joelsiks•34m ago
nly•34m ago
https://catonmat.net/simple-ld-preload-tutorial-part-two
There's actually a better way to hook GNUs malloc:
https://www.man7.org/linux/man-pages/man3/malloc_hook.3.html
This is better because you can disable the hook inside the callback, and therefore use malloc within your malloc hook (no recursion)
But you can't use this mechanism before main()