From: Kevin Ashley Newsgroups: comp.os.msdos.djgpp Subject: Re: [Q] wrapping functions with linker Date: Mon, 18 Aug 1997 15:58:36 +0100 Organization: University of London Computer Centre Lines: 26 Message-ID: <33F8631C.41C6@ulcc.ac.uk> References: <5stvfi$ffm$1 AT newton DOT pacific DOT net DOT sg> NNTP-Posting-Host: silver.ulcc.ac.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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