"Fossies" - the Fresh Open Source Software Archive 
Member "mpr-2.8/mpr-2.8.spec" (6 Jun 2005, 4667 Bytes) of package /linux/misc/old/mpr-2.8.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) RPM Spec source code syntax highlighting (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 Summary: memory allocation profiler for C/C++ programs
2 Name: mpr
3 Version: 2.8
4 Release: 1
5 Copyright: GPL+LGPL
6 Group: Development/Languages/C
7 Source: http://pobox.com/~taj.khattra/mpr/mpr-2.8.tar.gz
8 Packager: Taj Khattra <taj.khattra@gmail.com>
9 Requires: gdb, gcc, binutils
10 ExclusiveArch: i386
11 ExclusiveOs: Linux
12 BuildRoot: /var/tmp/mpr-root
13
14 %description
15 mpr is a memory allocation profiler for C/C++ programs.
16
17 mpr finds malloc/realloc memory leaks and memory allocation statistics by
18 using a simple, brute force strategy: log all malloc/free calls to a file and
19 post-process this log file when the program terminates.
20
21 mpr keeps track of the entire call chain leading up to a malloc/free call. This
22 is superior to conventional methods that keep track of only the immediate
23 caller using __FILE__ and __LINE__ pre-processor tricks.
24
25 As of version 2.0, you no longer need to re-link your application in order to
26 use mpr. If your program is dynamically linked, using mpr can be as simple as
27 typing 'mpr program ...' (see mpr.html for details).
28
29 --
30
31 To give you an idea of what mpr can do, here are some sample outputs:
32
33 (1) memory allocations grouped by call chains:
34 (col2=number of allocs, col3=amount allocated, col4=percent)
35
36 main(tst.c,52) 55 1760 2.35%%
37 foo(bar.c,14):bar(bar.c,28):main(tst.c,59) 200 2000 2.67%%
38 main(tst.c,47) 200 3200 4.27%%
39 foo(bar.c,19):bar(bar.c,28):main(tst.c,59) 200 4000 5.34%%
40 foo(tst.c,34):main(tst.c,58) 200 12800 17.08%%
41 foo(baz.c,21):baz(baz.c,29):main(tst.c,60) 200 51200 68.30%%
42
43 (2) memory leaks grouped by call chains:
44 (col2=number of allocs leaked, col3=amount leaked, col4=percent)
45
46 main(tst.c,47) 52 832 2.36%%
47 foo(bar.c,14):bar(bar.c,28):main(tst.c,59) 88 880 2.50%%
48 main(tst.c,52) 31 992 2.82%%
49 foo(bar.c,19):bar(bar.c,28):main(tst.c,59) 103 2060 5.85%%
50 foo(tst.c,34):main(tst.c,58) 108 6912 19.62%%
51 foo(baz.c,21):baz(baz.c,29):main(tst.c,60) 92 23552 66.86%%
52
53 (3) memory allocations grouped by size:
54 (col1=size, col2=number of allocs, col3=amount allocated col4=percent)
55
56 32 55 1760 2.35%%
57 10 200 2000 2.67%%
58 16 200 3200 4.27%%
59 20 200 4000 5.34%%
60 64 200 12800 17.08%%
61 256 200 51200 68.30%%
62
63 (4) memory leaks grouped by size:
64 (col1=size, col2=number of allocs leaked, col3=amount leaked, col4=percent)
65
66 16 52 832 2.36%%
67 10 88 880 2.50%%
68 32 31 992 2.82%%
69 20 103 2060 5.85%%
70 64 108 6912 19.62%%
71 256 92 23552 66.86%%
72
73 --
74
75 %changelog
76 * Mon Jun 06 2005 Taj Khattra <taj.khattra@gmail.com>
77 - upgraded to 2.8
78
79 * Fri Jan 02 2004 Taj Khattra <taj.khattra@pobox.com>
80 - upgraded to 2.7
81
82 * Wed Dec 31 2003 Taj Khattra <taj.khattra@pobox.com>
83 - upgraded to 2.6
84
85 * Mon Nov 11 2002 Taj Khattra <taj.khattra@pobox.com>
86 - upgraded to 2.5
87
88 * Sun Aug 11 2002 Taj Khattra <taj.khattra@pobox.com>
89 - upgraded to 2.4
90
91 * Thu Dec 20 2001 Taj Khattra <taj.khattra@pobox.com>
92 - upgraded to 2.3
93
94 * Sun Oct 01 2000 Taj Khattra <taj.khattra@pobox.com>
95 - upgraded to 2.2
96
97 * Wed Jan 26 2000 Taj Khattra <taj.khattra@pobox.com>
98 - upgraded to 2.1
99
100 * Wed Oct 20 1999 Taj Khattra <taj.khattra@pobox.com>
101 - upgraded to 2.0
102
103 * Tue May 19 1998 Cristian Gafton <gafton@redhat.com>
104 - upgraded to 1.8
105 - buildroot
106
107 * Wed Nov 26 1997 Otto Hammersmith <otto@redhat.com>
108 - fixed conflict with basename prototype
109
110 * Mon Apr 28 1997 Michael Fulbright <msf@redhat.com>
111 - Updated to version 1.6
112
113 * Tue Feb 25 1997 Michael Fulbright <msf@redhat.com>
114 - Cleaned up package, entered into powercd tree.
115
116 * Wed Feb 19 1997 Erik Troan <ewt@redhat.com>
117 - Initial version
118
119 %prep
120 %setup
121
122 %build
123 make CC=gcc CFLAGS="$RPM_OPT_FLAGS"
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127 mkdir -p $RPM_BUILD_ROOT/usr/{bin,lib}
128 make BINDIR=$RPM_BUILD_ROOT/usr/bin LIBDIR=$RPM_BUILD_ROOT/usr/lib install
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %files
134 %doc BUGS COPYING COPYING.LIB doc/mpr.html doc/mpr.ps doc/mpr.pdf FAQ INSTALL LICENSE LOG README
135 /usr/lib/*
136 /usr/bin/*