1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY gc-download-http
|
---|
8 | "http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-&gc-version;.tar.gz">
|
---|
9 | <!ENTITY gc-download-ftp " ">
|
---|
10 | <!ENTITY gc-md5sum "91340b28c61753a789eb6077675d87d2">
|
---|
11 | <!ENTITY gc-size "1.3 MB">
|
---|
12 | <!ENTITY gc-buildsize "13 MB">
|
---|
13 | <!ENTITY gc-time "0.2 SBU">
|
---|
14 | ]>
|
---|
15 |
|
---|
16 | <sect1 id="gc" xreflabel="GC-&gc-version;">
|
---|
17 | <?dbhtml filename="gc.html"?>
|
---|
18 |
|
---|
19 | <sect1info>
|
---|
20 | <othername>$LastChangedBy$</othername>
|
---|
21 | <date>$Date$</date>
|
---|
22 | </sect1info>
|
---|
23 |
|
---|
24 | <title>GC-&gc-version;</title>
|
---|
25 |
|
---|
26 | <indexterm zone="gc">
|
---|
27 | <primary sortas="a-GC">GC</primary>
|
---|
28 | </indexterm>
|
---|
29 |
|
---|
30 | <sect2 role="package">
|
---|
31 | <title>Introduction to GC</title>
|
---|
32 |
|
---|
33 | <para>
|
---|
34 | The <application>GC</application> package contains the Boehm-Demers-Weiser
|
---|
35 | conservative garbage collector, which can be used as a garbage collecting
|
---|
36 | replacement for the C malloc function or C++ new operator. It allows you
|
---|
37 | to allocate memory basically as you normally would, without explicitly
|
---|
38 | deallocating memory that is no longer useful. The collector automatically
|
---|
39 | recycles memory when it determines that it can no longer be otherwise
|
---|
40 | accessed. The collector is also used by a number of programming language
|
---|
41 | implementations that either use C as intermediate code, want to facilitate
|
---|
42 | easier interoperation with C libraries, or just prefer the simple
|
---|
43 | collector interface. Alternatively, the garbage collector may be used as a
|
---|
44 | leak detector for C or C++ programs, though that is not its primary goal.
|
---|
45 | </para>
|
---|
46 |
|
---|
47 | &lfs72_checked;
|
---|
48 |
|
---|
49 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
50 | <itemizedlist spacing="compact">
|
---|
51 | <listitem>
|
---|
52 | <para>Download (HTTP): <ulink url="&gc-download-http;"/></para>
|
---|
53 | </listitem>
|
---|
54 | <listitem>
|
---|
55 | <para>Download (FTP): <ulink url="&gc-download-ftp;"/></para>
|
---|
56 | </listitem>
|
---|
57 | <listitem>
|
---|
58 | <para>Download MD5 sum: &gc-md5sum;</para>
|
---|
59 | </listitem>
|
---|
60 | <listitem>
|
---|
61 | <para>Download size: &gc-size;</para>
|
---|
62 | </listitem>
|
---|
63 | <listitem>
|
---|
64 | <para>Estimated disk space required: &gc-buildsize;</para>
|
---|
65 | </listitem>
|
---|
66 | <listitem>
|
---|
67 | <para>Estimated build time: &gc-time;</para>
|
---|
68 | </listitem>
|
---|
69 | </itemizedlist>
|
---|
70 |
|
---|
71 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
72 | <para role="optional">
|
---|
73 | <xref linkend="libatomic_ops"/> (Gc contains a copy of
|
---|
74 | Libatomic_ops-&gc-version; which it will compile and statically link if
|
---|
75 | configure doesn't find Libatomic_ops installed on your system).
|
---|
76 | </para>
|
---|
77 |
|
---|
78 | <para condition="html" role="usernotes">
|
---|
79 | User Notes: <ulink url="&blfs-wiki;/gc"/>
|
---|
80 | </para>
|
---|
81 | </sect2>
|
---|
82 |
|
---|
83 | <sect2 role="installation">
|
---|
84 | <title>Installation of GC</title>
|
---|
85 |
|
---|
86 | <para>
|
---|
87 | Install <application>GC</application> by running the following commands:
|
---|
88 | </para>
|
---|
89 |
|
---|
90 | <screen><userinput>sed -i 's#pkgdata#doc#' doc/doc.am && autoreconf &&
|
---|
91 | ./configure --prefix=/usr \
|
---|
92 | --enable-cplusplus \
|
---|
93 | --disable-static \
|
---|
94 | --docdir=/usr/share/doc/gc-&gc-version; &&
|
---|
95 | make</userinput></screen>
|
---|
96 |
|
---|
97 | <para>To test the results, issue: <command>make check</command>.</para>
|
---|
98 |
|
---|
99 | <para>
|
---|
100 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
101 | </para>
|
---|
102 |
|
---|
103 | <screen role="root"><userinput>make install &&
|
---|
104 | install -v -m644 doc/gc.man /usr/share/man/man3/gc_malloc.3 &&
|
---|
105 | ln -sfv gc_malloc.3 /usr/share/man/man3/gc.3 </userinput></screen>
|
---|
106 | </sect2>
|
---|
107 |
|
---|
108 | <sect2 role="commands">
|
---|
109 | <title>Command Explanations</title>
|
---|
110 |
|
---|
111 | <para>
|
---|
112 | <command>sed -i 's#pkgdata#doc#' doc/doc.am</command>,
|
---|
113 | <command>autoreconf</command> and
|
---|
114 | <option>--docdir=/usr/share/doc/gc-&gc-version;</option>: These commands
|
---|
115 | allow us to install the documentation in a versioned directory.
|
---|
116 | </para>
|
---|
117 |
|
---|
118 | <para>
|
---|
119 | <parameter>--enable-cplusplus</parameter>: This parameter enables the
|
---|
120 | building and installing the C++ library along with the standard C library.
|
---|
121 | </para>
|
---|
122 |
|
---|
123 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
124 | href="../../xincludes/static-libraries.xml"/>
|
---|
125 |
|
---|
126 | </sect2>
|
---|
127 |
|
---|
128 | <sect2 role="content">
|
---|
129 | <title>Contents</title>
|
---|
130 |
|
---|
131 | <segmentedlist>
|
---|
132 | <segtitle>Installed Libraries</segtitle>
|
---|
133 | <segtitle>Installed Directories</segtitle>
|
---|
134 |
|
---|
135 | <seglistitem>
|
---|
136 | <seg>
|
---|
137 | libcord.so, libgc.so and
|
---|
138 | libgccpp.so
|
---|
139 | </seg>
|
---|
140 | <seg>
|
---|
141 | /usr/include/gc and
|
---|
142 | /usr/share/doc/gc
|
---|
143 | </seg>
|
---|
144 | </seglistitem>
|
---|
145 | </segmentedlist>
|
---|
146 |
|
---|
147 | <variablelist>
|
---|
148 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
149 | <?dbfo list-presentation="list"?>
|
---|
150 | <?dbhtml list-presentation="table"?>
|
---|
151 |
|
---|
152 | <varlistentry id="libgc">
|
---|
153 | <term><filename class='libraryfile'>libgc.so</filename></term>
|
---|
154 | <listitem>
|
---|
155 | <para>
|
---|
156 | contains a C interface to the conservative garbage collector,
|
---|
157 | primarily designed to replace the C malloc function.
|
---|
158 | </para>
|
---|
159 | <indexterm zone="gc libgc">
|
---|
160 | <primary sortas="c-libgc">libgc.so</primary>
|
---|
161 | </indexterm>
|
---|
162 | </listitem>
|
---|
163 | </varlistentry>
|
---|
164 |
|
---|
165 | <varlistentry id="libgccpp">
|
---|
166 | <term><filename class='libraryfile'>libgccpp.so</filename></term>
|
---|
167 | <listitem>
|
---|
168 | <para>
|
---|
169 | contains a C++ interface to the conservative garbage collector.
|
---|
170 | </para>
|
---|
171 | <indexterm zone="gc libgccpp">
|
---|
172 | <primary sortas="c-libgccpp">libgccpp.so</primary>
|
---|
173 | </indexterm>
|
---|
174 | </listitem>
|
---|
175 | </varlistentry>
|
---|
176 |
|
---|
177 | </variablelist>
|
---|
178 |
|
---|
179 | </sect2>
|
---|
180 |
|
---|
181 | </sect1>
|
---|