Usenet comp.os.linux.announce (1993-2013)
 help / color / mirror / Atom feed
From: taj@wimsey.com (Taj Khattra)
Subject: mpr-1.1 - a poor man's memory profiler
Date: 1996/05/22	[thread overview]
Message-ID: <cola-liw-832785549-32507-0@liw.clinet.fi> (raw)


-----BEGIN PGP SIGNED MESSAGE-----


I have uploaded mpr-1.1 to sunsite.unc.edu:/pub/Linux/Incoming/mpr-1.1.tar.gz.
It should move to directory /pub/Linux/devel/lang/c soon.

mpr used to be called mp; it was renamed because of a naming conflict with
an existing Unix program.

Here are some excerpts from README:

    This is version 1.1 of mpr, a poor man's memory profiling package for
    Unix/C programs. It is inspired by Benjamin Zorn's memory profiler mprof.

    mpr can be used to find malloc/realloc memory leaks and memory allocation
    statistics and patterns - it does not find memory corruption errors.
    The basic strategy is to log all memory alloc/free requests to a log file
    and then post-process this log file once the program has terminated.

    mpr keeps track of the entire call chain leading up to a memory
    alloc/free request, making it much easier to find memory allocation
    problems. This is superior to conventional methods of keeping track of
    only the immediate caller of a memory alloc/free routine using, e.g.,
    __FILE__ and __LINE__.

    To give you an idea of what mpr can do, here are some sample outputs for
    the example program that is included with mpr-1.1.

        memory allocations grouped by call chains:
        (column2=number of allocs, column3=amount allocated)

            main(tst.c,58)                                 45         1440
	    foo(bar.c,14):bar(bar.c,28):main(tst.c,65)     200        2000
            main(tst.c,53)                                 200        3200
            foo(bar.c,19):bar(bar.c,28):main(tst.c,65)     200        4000
            foo(tst.c,36):main(tst.c,64)                   200        12800
            foo(baz.c,21):baz(baz.c,29):main(tst.c,66)     200        51200

        memory leaks grouped by call chains:
        (column2=number of allocs leaked, column3=amount leaked)

            main(tst.c,58)                                 21         672
            main(tst.c,53)                                 45         720
            foo(bar.c,14):bar(bar.c,28):main(tst.c,65)     92         920
            foo(bar.c,19):bar(bar.c,28):main(tst.c,65)     101        2020
            foo(tst.c,36):main(tst.c,64)                   94         6016
            foo(baz.c,21):baz(baz.c,29):main(tst.c,66)     108        27648

        memory allocations grouped by size:
        (column1=size, column2=number of allocs)

            10              200
            16              200
            20              200
            32              45
            64              200
            256             200

        memory leaks grouped by size:
        (column1=size, column2=number of allocs leaked)

            10              92
            16              45
            20              101
            32              21
            64              94
            256             108

Here is a summary of changes from the previous version:

	- renamed package from mp to mpr (mp is the name of an existing Unix
	  based Postscript pretty printer program)
	- mp: renamed to mpr
	- mprhi: added options -c (call chain length), -b (block size)
	  and -w (display width). Option -c was suggested by Paul Hicks
	  <paulh@euristix.ie>.
	- mprfn: renamed to mprcc
	- mprcc: added options -c (call chain length) and -w (display width)
	- mpr.doc: added documentation

Here is the LSM entry:

Begin3
Title:		mpr - a poor man's memory profiler for Unix/C programs
Version:        1.1
Entered-date:   21MAY96
Description:    mpr can be used to find malloc/realloc memory leaks and
		memory allocation statistics and patterns - it does not
		find memory corruption errors.
Keywords:       memory leak, memory profile, malloc
Author:         taj@wimsey.com (Taj Khattra)
Maintained-by:  
Primary-site:   sunsite.unc.edu	/pub/Linux/devel/lang/c
			52612	mpr-1.1.tar.gz
			613	mpr-1.1.lsm
Alternate-site: 
Original-site:  
Platforms:      x86-linux, x86-sco, vax-ultrix
Copying-policy: almost public domain
End


-----BEGIN PGP SIGNATURE-----
Version: 2.6.2i

iQCVAwUBMaNMiYQRll5MupLRAQG+MAP/cSRzpYz0YsMkxZN60JVk/2FjEdTRxXQL
5NaCSfXq2mk8NBP5ol3mW9fOngLCN6c8L8z/SQNTaz2rqew2VqpIzPC7f7iXR8Gn
k5uA9R4trnNPWKfrS0g/3eTDxC7uHzJum9qllE3g9K9y6IkjYyMy6zgBtkiqJqsW
2r0iH7D8g7E=
=OaBq
-----END PGP SIGNATURE-----

-- 
This article has been digitally signed by the moderator, using PGP.
Finger wirzeniu@kruuna.helsinki.fi for PGP key needed for validating signature.
Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov
PLEASE remember a short description of the software and the LOCATION.



                 reply	other threads:[~1996-05-22  4:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox