Detours
Detours copied to clipboard
Add minimal sample for detouring malloc
It would be great if there was a minimal sample which intercepts malloc and shows how to run code before and after the original malloc. In the sample it could be just a printf of the requested size and (after malloc did run) the obtained memory address.
I would find this especially useful as the FAQ has an entry on malloc.