|
4.1 Using a Shell Alias with the UtilityThe dmalloc program is designed to assist in the setting of the
environment variable `DMALLOC_OPTIONS'. See section Environment Variable Name and Features. It is designed to print the shell commands necessary to make
the appropriate changes to the environment. Unfortunately, it cannot
make the changes on its own so the output from dmalloc should be sent
through the With shells that have aliasing or macro capabilities: csh, bash, ksh, tcsh, zsh, etc., setting up an alias to dmalloc to do the eval call is recommended. Bash, ksh, and zsh users should add the following to their `.bashrc', `.profile', or `.zshrc' file respectively (notice the -b option for bourne shell output):
If your shell does not support the
or
If you are still using csh or tcsh, you should add the following to your `.cshrc' file (notice the -C option for c-shell output):
This allows the user to execute the dmalloc command as `dmalloc arguments'. Users of versions of the Bourne shell (usually known as /bin/sh) that don't have command functions will need to send the output to a temporary file and the read it back in with the "." command:
By the way, if you are looking for a shell, I heartily recommend trying out zsh. It is a bourne shell written from scratch with much the same features as tcsh without the csh crap. NOTE: After you add the alias to the file you need to log out and log back in to have it take effect, or you can execute the above appropriate command on the command line. If you enter dmalloc runtime and see any output with DMALLOC_OPTIONS in it then the alias did not work.
This document was generated by Gray Watson on May, 16 2007 using texi2html 1.76.
This work is licensed by Gray Watson
under the Creative Commons
Attribution-Share Alike 3.0 License. |