overriding function calls without recompiling

i want to replace the *alloc and free function calls in an existing project with my own functions, to be able to log the adresses etc in a text file. (memoryleak debugging)
I think LD_PRELOAD is what i am looking for.
That way i could create a Library with my own malloc functions and link them into the project with the LD_PRELOAD environment.

--> But <--
LD_PRELOAD is not aviable on AIX 5.2.
Is there another way (workaround) to override certain functions without having recompiling to the whole source?
I could live with re-linking the executable but ofcourse it would be the most comfortable way, not having to touch the exe.

i am thankful for any kind of tipps or hints
Lazzar

Hi

You can use DPCL, this is a tool that allows dynamic code change on an existing running process image, and the image change does not require recompiling nor restarting the process, look at this page here Dynamic Probe Class Library download | SourceForge.net

Good luck