The mleak command scans through an mpatrol log file looking for lines beginning with ALLOC: and FREE: but ignores lines beginning with REALLOC:, so only the LOGALLOCS and LOGFREES options are necessary when running a program linked with the mpatrol library. Note that as a result of this, no attempt is made to account for resizing of memory allocations and so the total amount of memory used by the resulting unfreed allocations may not be entirely accurate.
This command will also read the unfreed allocations table produced by the SHOWUNFREED option in the log file if one is present. The entries in the table will be compared with the currently allocated entries and will be added if not already present.
The file argument must be a valid mpatrol log filename but if file is omitted then mleak will use mpatrol.log as the name of the log file to use. The mleak command makes two passes over the log file so the file must be randomly-accessable. If file is given as - then the standard input file stream will be used as the log file.
The mpatrol manual and reference card.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.