~ubuntu-branches/ubuntu/quantal/libgc/quantal

« back to all changes in this revision

Viewing changes to doc/leak.html

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Egger
  • Date: 2011-02-19 12:19:56 UTC
  • mfrom: (1.3.2 upstream) (0.1.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20110219121956-67rb69xlt5nud3v2
Tags: 1:7.1-5
Upload to unstable

Show diffs side-by-side

added added

removed removed

Lines of Context:
161
161
Since version 6.1, it should be possible to run the collector in leak
162
162
detection mode on a program a.out under Linux/X86 as follows:
163
163
<OL>
164
 
<LI> Ensure that a.out is a single-threaded executable.  This doesn't yet work
165
 
for multithreaded programs.
 
164
<LI> <I>Ensure that a.out is a single-threaded executable, or you are using
 
165
a very recent (7.0alpha7+) collector version on Linux.</i>
 
166
On most platforms this does not
 
167
work at all for multithreaded programs.
166
168
<LI> If possible, ensure that the addr2line program is installed in
167
169
/usr/bin.  (It comes with RedHat Linux.)
168
170
<LI> If possible, compile a.out with full debug information.
171
173
improve the quality of the leak reports.
172
174
<LI> Build the collector and install it in directory <I>foo</i> as follows:
173
175
<UL>
174
 
<LI> configure --prefix=<I>foo</i> --enable-full-debug --enable-redirect-malloc
175
 
--disable-threads
176
 
<LI> make
177
 
<LI> make install
 
176
<LI> <TT>configure --prefix=<I>foo</i> --enable-full-debug --enable-redirect-malloc
 
177
--disable-threads</tt>
 
178
<LI> <TT>make</tt>
 
179
<LI> <TT>make install</tt>
178
180
</ul>
 
181
With a very recent collector on Linux, it may be safe to omit the <TT>--disable-threads</tt>.
179
182
<LI> Set environment variables as follows:
180
183
<UL>
181
184
<LI> LD_PRELOAD=<I>foo</i>/lib/libgc.so
191
194
mountains of leak reports if the application wasn't designed to avoid leaks,
192
195
<I>e.g.</i> because it's always short-lived.
193
196
</ol>
194
 
This has not yet been thropughly tested on large applications, but it's known
 
197
This has not yet been thoroughly tested on large applications, but it's known
195
198
to do the right thing on at least some small ones.
196
199
</body>
197
200
</html>