Tuesday, February 01, 2005

Scripting and dmalloc

You've to save it and make it executable: chmod 775 modreg.tcl
I wrote an ordinary shellscript too.. start off with #!/bin/sh or wherever sh exists. Running it with sh filename also works, just like tcl filename will..

I also learnt how to test for memory leaks with dmalloc. All you need is a folder dmalloc containing the program. Then..

dmalloc-5.4.2]$ sh ./configure
dmalloc-5.4.2]$ make (make threadssl and make shlib)
dmalloc-5.4.2]$ cd ../Feb1/
Feb 1]$ alias dmalloc=../dmalloc-5.4.2/dmalloc
Feb 1]$ export DMALLOC_OPTIONS=log-stats,log-non-free,log-trans,log=logfile,inter=1
Feb 1]$ dmalloc

The output should contain the line:
Logpath 'logfile'

Feb 1]$ make -f Makefile.dmalloc
Feb 1]$ ./bin/binary

I'll supply details of the dmalloc Makefile shortly..

0 Comments:

Post a Comment

<< Home