Mail Archives: djgpp/1997/08/18/22:19:20
This doesn't answer your question about using the link-wrapper
directly, but I think others have already done that for you.
However, if you are using wrappers to try to debug use of malloc
in your programs, then you should try the dbmalloc library.
dbmalloc works as a drop-in replacement for malloc, and many
other functions (such as memcpy) which are often the source of
problems with malloc'ed memory. You can either recompile your
source with dbmalloc's Malloc.h included, or just link against
the dbmalloc library, or a combination of both. It takes care
of all the function wrapping that is required. All you need
to do is to link the dbmalloc library before the system libraries.
It can be used to detect problems with corrupted areas of the heap
or to collect statistics on your use of malloc'ed memory.
I use it a lot, both with djgpp and on other platforms.
It may already have been ported to DJGPP (I don't know, as I'm still
using 1.12) or you can find it anywhere that archives posts from
comp.sources.misc.
--------------------------------------------------------------------
Kevin Ashley K DOT Ashley AT Ulcc DOT ac DOT uk
Development Manager http://www.ulcc.ac.uk/staff/Kevin+Ashley
University of London Computer Centre. ...ukc!ncdlab!K.Ashley
This is not a signature
- Raw text -