Penguin
Note: You are viewing an old revision of this page. View the current version.
The gnu c library (glibc 2 a.k.a linux libc6) has a couple of helpful features for finding memory allocation/usage problems, including uninitialised and unfreed memory. In your C program (and C++?)
  1. include <mcheck.h> ... main(int, char**) { mtrace(); ...

include the mcheck.h header file in all your .c files, and call mtrace as the first statement in main.

then
$ export MALLOC_TRACE=<outputfilename> $ <runprog> $ mtrace <prog> <outputfilename>

See also LD_DEBUG, MALLOC_CHECK_

The following authors of this page have not agreed to the WlugWikiLicense. As such copyright to all content on this page is retained by the original authors.
  • MartinGadbois
The following authors of this page have agreed to the WlugWikiLicense.

PHP Warning

lib/plugin/WlugLicense.php:99: Warning: Invalid argument supplied for foreach()

lib/plugin/WlugLicense.php:111: Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument

lib/plugin/WlugLicense.php:111: Warning: in_array() [<a href='function.in-array'>function.in-array</a>]: Wrong datatype for second argument