DMALLOC(1) | General Commands Manual | DMALLOC(1) |
dmalloc - program used to set the environment for debugging using the dmalloc debugging library.
dmalloc [options]
This manual page documents the dmalloc command. It was written for the Debian GNU/Linux distribution based, almost verbatim, on the original documentation provided by the library in GNU Info format; see below.
The dmalloc program is designed to assist in the setting of the environment variable DMALLOC_OPTIONS. 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 `eval' shell command which will do the commands.
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. Csh/tcsh users (for example) should put the following in their `.cshrc' file:
alias dmalloc 'eval `\dmalloc -C *`'
Bash and Zsh users on the other hand should put the following in their `.zshrc' file:
function dmalloc { eval `command dmalloc -b $*` }
This allows the user to execute the dmalloc command as `dmalloc arguments'.
The most basic usage for the program is `dmalloc [-bC]
tag'.
The `-b' or `-C' (either but not both flags used at a time) are
for generating Bourne or C shell type commands respectively. dmalloc will
try and use the `SHELL' environment variable to determine whether
bourne or C shell commands should be generated but you may want to
explicitly specify the correct flag.
The tag argument to dmalloc should match a line from the user's run-time configuration file or should be one of the built-in tags. If no tag is specified and no other option-commands used, dmalloc will display the current settings of the environment variable. It is useful to specify one of the verbose options when doing this.
To find out the usage for the debug malloc program try dmalloc --usage-long. The standardized usage message that will be displayed is one of the many features of the argv library included with this package. It is available via ftp from `ftp.letters.com' in the `/src/argv' directory. See `argv.info' there for more information.
If no arguments are specified, dmalloc dumps out the current settings that you have for the environment variable. For example:
Debug-Flags '0x40005c7' (runtime)
Address 0x1f008, count = 3
Interval 100
Logpath 'malloc'
Start-File not-set
With a -v option and no arguments, dmalloc dumps out the current settings in a verbose manner. For example:
Debug-Flags '0x40005c7' (runtime)
log-stats, log-non-free, log-blocks, log-unknown,
log-bad-space, check-fence, catch-null
Address 0x1f008, count = 10
Interval 100
Logpath 'malloc'
Start-File not-set
The documentation for the library is in GNU Info format. Please check the file /usr/share/info/dmalloc.info.gz for more details.
This manual page was written by Luis Francisco González <luisgh@debian.org>, for the Debian GNU/Linux system (but may be used by others). The library was written by Gray Watson. Please see the copyright file in /usr/share/doc/libdmalloc-dev for details.