FreeBSD Manual Pages
MLEAK(1) mpatrol library MLEAK(1) NAME mleak - locates memory leaks in an mpatrol log file SYNOPSIS mleak [options] [file] DESCRIPTION The mleak command is used to display all unfreed memory allocations from a log file produced by the mpatrol library. This should be used if the mpatrol library could not finish writing the log file due to ab- normal program termination (which would prevent the SHOWUNFREED option from working), but note that some of the unfreed allocations might have been freed if the program had terminated successfully. The mleak command scans through an mpatrol log file looking for lines beginning with ALLOC: and FREE: but ignores lines beginning with REAL- LOC:, so only the LOGALLOCS and LOGFREES options are necessary when running a program linked with the mpatrol library. Note that as a re- sult of this, no attempt is made to account for resizing of memory al- locations and so the total amount of memory used by the resulting un- freed 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. OPTIONS --help [-h] Displays a quick-reference option summary. --ignore [-i] Specifies that the list of unfreed allocations in the log file should be ignored. --max-stack depth [-n] Specifies the maximum stack depth to display for each unfreed memory allocation. If depth is 0 then the call stack depth will be unlimited in size. The default call stack depth is 0. --version [-V] Displays the version number of the mleak command. SEE ALSO mpatrol(1), mprof(1), mptrace(1), mpsym(1), mpedit(1), hexwords(1), libmpatrol(3), libmpalloc(3). The mpatrol manual and reference card. http://www.cbmamiga.demon.co.uk/mpatrol/ AUTHOR Graeme S. Roy <graeme.roy@analog.com> COPYRIGHT Copyright (C) 1997-2002 Graeme S. Roy <graeme.roy@analog.com> 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 MER- CHANTABILITY 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 Li- cense along with this library; if not, write to the Free Software Foun- dation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. Release 1.4 8 January 2002 MLEAK(1)
NAME | SYNOPSIS | DESCRIPTION | OPTIONS | SEE ALSO | AUTHOR | COPYRIGHT
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=mleak&sektion=1&manpath=FreeBSD+Ports+15.0>
