View Single Post
  #3  
Old 10-12-2004, 06:40 PM
Doodman's Avatar
Doodman
Developer
 
Join Date: Aug 2003
Posts: 246
Default

Just an FYI, you can make you code work without having to change existing code.

1) Do it like electric fences does (or use electric fence: emerge efence) and write a static library where you write your own malloc, calloc, realloc that call _malloc, _calloc, _realloc respectively. (IIRC on the naming convention of the internal functions). And then just re-link with your new library and you'll get you malloc, calloc, realloc functions. I've done this before, btw, I know it works.
2) Do the above but make it a shared libary and set LD_PRELOAD=mylib.so and no relinking is needed, so it could be used on -any- executable not just your own.

Just some tips.
Reply With Quote