[3bbd5fe9] | 1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
[6732c094] | 2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
| 3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
[3bbd5fe9] | 4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
| 5 | %general-entities;
|
---|
| 6 |
|
---|
[b3bb56b] | 7 | <!ENTITY gc-download-http
|
---|
[4e143323] | 8 | "http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/gc-&gc-version;.tar.gz">
|
---|
[8057fc4] | 9 | <!ENTITY gc-download-ftp " ">
|
---|
[4e143323] | 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">
|
---|
[3bbd5fe9] | 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 |
|
---|
[b3bb56b] | 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 |
|
---|
[ba291e0] | 47 | &lfs72_checked;
|
---|
[d4796f8b] | 48 |
|
---|
[3bbd5fe9] | 49 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 50 | <itemizedlist spacing="compact">
|
---|
| 51 | <listitem>
|
---|
[4355dbcf] | 52 | <para>
|
---|
| 53 | Download (HTTP): <ulink url="&gc-download-http;"/>
|
---|
| 54 | </para>
|
---|
[3bbd5fe9] | 55 | </listitem>
|
---|
| 56 | <listitem>
|
---|
[4355dbcf] | 57 | <para>
|
---|
| 58 | Download (FTP): <ulink url="&gc-download-ftp;"/>
|
---|
| 59 | </para>
|
---|
[3bbd5fe9] | 60 | </listitem>
|
---|
| 61 | <listitem>
|
---|
[4355dbcf] | 62 | <para>
|
---|
| 63 | Download MD5 sum: &gc-md5sum;
|
---|
| 64 | </para>
|
---|
[3bbd5fe9] | 65 | </listitem>
|
---|
| 66 | <listitem>
|
---|
[4355dbcf] | 67 | <para>
|
---|
| 68 | Download size: &gc-size;
|
---|
| 69 | </para>
|
---|
[3bbd5fe9] | 70 | </listitem>
|
---|
| 71 | <listitem>
|
---|
[4355dbcf] | 72 | <para>
|
---|
| 73 | Estimated disk space required: &gc-buildsize;
|
---|
| 74 | </para>
|
---|
[3bbd5fe9] | 75 | </listitem>
|
---|
| 76 | <listitem>
|
---|
[4355dbcf] | 77 | <para>
|
---|
| 78 | Estimated build time: &gc-time;
|
---|
| 79 | </para>
|
---|
[3bbd5fe9] | 80 | </listitem>
|
---|
| 81 | </itemizedlist>
|
---|
| 82 |
|
---|
[b3bb56b] | 83 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 84 | <para role="optional">
|
---|
| 85 | <xref linkend="libatomic_ops"/> (Gc contains a copy of
|
---|
| 86 | Libatomic_ops-&gc-version; which it will compile and statically link if
|
---|
[4355dbcf] | 87 | configure doesn't find Libatomic_ops installed on your system)
|
---|
[b3bb56b] | 88 | </para>
|
---|
[1039de3] | 89 |
|
---|
[b3bb56b] | 90 | <para condition="html" role="usernotes">
|
---|
| 91 | User Notes: <ulink url="&blfs-wiki;/gc"/>
|
---|
| 92 | </para>
|
---|
[3bbd5fe9] | 93 | </sect2>
|
---|
| 94 |
|
---|
| 95 | <sect2 role="installation">
|
---|
| 96 | <title>Installation of GC</title>
|
---|
| 97 |
|
---|
[b3bb56b] | 98 | <para>
|
---|
| 99 | Install <application>GC</application> by running the following commands:
|
---|
| 100 | </para>
|
---|
[3bbd5fe9] | 101 |
|
---|
[4355dbcf] | 102 | <screen><userinput>sed -i 's#AM_CONFIG_HEADER#AC_CONFIG_HEADERS#' configure.ac &&
|
---|
| 103 | sed -i 's#AM_CONFIG_HEADER#AC_CONFIG_HEADERS#' libatomic_ops/configure.ac &&
|
---|
| 104 | sed -i 's#pkgdata#doc#' doc/doc.am &&
|
---|
| 105 | autoreconf -fi &&
|
---|
[1eb827c6] | 106 | ./configure --prefix=/usr \
|
---|
| 107 | --enable-cplusplus \
|
---|
| 108 | --disable-static \
|
---|
| 109 | --docdir=/usr/share/doc/gc-&gc-version; &&
|
---|
[3bbd5fe9] | 110 | make</userinput></screen>
|
---|
| 111 |
|
---|
[4355dbcf] | 112 | <para>
|
---|
| 113 | To test the results, issue: <command>make check</command>.
|
---|
| 114 | </para>
|
---|
[3bbd5fe9] | 115 |
|
---|
[b3bb56b] | 116 | <para>
|
---|
| 117 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 118 | </para>
|
---|
[3bbd5fe9] | 119 |
|
---|
| 120 | <screen role="root"><userinput>make install &&
|
---|
| 121 | install -v -m644 doc/gc.man /usr/share/man/man3/gc_malloc.3 &&
|
---|
[b3bb56b] | 122 | ln -sfv gc_malloc.3 /usr/share/man/man3/gc.3 </userinput></screen>
|
---|
[3bbd5fe9] | 123 | </sect2>
|
---|
| 124 |
|
---|
| 125 | <sect2 role="commands">
|
---|
| 126 | <title>Command Explanations</title>
|
---|
| 127 |
|
---|
[b3bb56b] | 128 | <para>
|
---|
[4355dbcf] | 129 | <command>sed -i 's#AM_CONFIG_HEADER ...</command>: This
|
---|
| 130 | <command>sed</command> fixes building with
|
---|
| 131 | <application>Automake</application> 1.13.
|
---|
| 132 | </para>
|
---|
| 133 |
|
---|
| 134 | <para>
|
---|
| 135 | <command>sed -i 's#pkgdata#doc#' doc/doc.am</command> and
|
---|
| 136 | <option>--docdir=/usr/share/doc/gc-&gc-version;</option>:
|
---|
| 137 | These commands are used so the package will install the
|
---|
| 138 | documentation in a versioned directory.
|
---|
| 139 | </para>
|
---|
| 140 |
|
---|
| 141 | <para>
|
---|
| 142 | <command>autoreconf -fi</command>: This regenerates the
|
---|
| 143 | <command>configure</command> script and the
|
---|
| 144 | <filename>Makefile.in</filename> files.
|
---|
[b3bb56b] | 145 | </para>
|
---|
[3bbd5fe9] | 146 |
|
---|
[b3bb56b] | 147 | <para>
|
---|
| 148 | <parameter>--enable-cplusplus</parameter>: This parameter enables the
|
---|
| 149 | building and installing the C++ library along with the standard C library.
|
---|
| 150 | </para>
|
---|
[4e143323] | 151 |
|
---|
| 152 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 153 | href="../../xincludes/static-libraries.xml"/>
|
---|
| 154 |
|
---|
[3bbd5fe9] | 155 | </sect2>
|
---|
| 156 |
|
---|
| 157 | <sect2 role="content">
|
---|
| 158 | <title>Contents</title>
|
---|
| 159 |
|
---|
| 160 | <segmentedlist>
|
---|
[c3c56b2] | 161 | <segtitle>Installed Programs</segtitle>
|
---|
[3bbd5fe9] | 162 | <segtitle>Installed Libraries</segtitle>
|
---|
| 163 | <segtitle>Installed Directories</segtitle>
|
---|
| 164 |
|
---|
| 165 | <seglistitem>
|
---|
[c3c56b2] | 166 | <seg>
|
---|
| 167 | None
|
---|
| 168 | </seg>
|
---|
[b3bb56b] | 169 | <seg>
|
---|
[4e143323] | 170 | libcord.so, libgc.so and
|
---|
[b3bb56b] | 171 | libgccpp.so
|
---|
| 172 | </seg>
|
---|
| 173 | <seg>
|
---|
| 174 | /usr/include/gc and
|
---|
| 175 | /usr/share/doc/gc
|
---|
| 176 | </seg>
|
---|
[3bbd5fe9] | 177 | </seglistitem>
|
---|
| 178 | </segmentedlist>
|
---|
| 179 |
|
---|
| 180 | <variablelist>
|
---|
| 181 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 182 | <?dbfo list-presentation="list"?>
|
---|
| 183 | <?dbhtml list-presentation="table"?>
|
---|
| 184 |
|
---|
| 185 | <varlistentry id="libgc">
|
---|
[4355dbcf] | 186 | <term><filename class="libraryfile">libgc.so</filename></term>
|
---|
[3bbd5fe9] | 187 | <listitem>
|
---|
[b3bb56b] | 188 | <para>
|
---|
| 189 | contains a C interface to the conservative garbage collector,
|
---|
| 190 | primarily designed to replace the C malloc function.
|
---|
| 191 | </para>
|
---|
[3bbd5fe9] | 192 | <indexterm zone="gc libgc">
|
---|
[b3bb56b] | 193 | <primary sortas="c-libgc">libgc.so</primary>
|
---|
[3bbd5fe9] | 194 | </indexterm>
|
---|
| 195 | </listitem>
|
---|
| 196 | </varlistentry>
|
---|
| 197 |
|
---|
| 198 | <varlistentry id="libgccpp">
|
---|
[4355dbcf] | 199 | <term><filename class="libraryfile">libgccpp.so</filename></term>
|
---|
[3bbd5fe9] | 200 | <listitem>
|
---|
[b3bb56b] | 201 | <para>
|
---|
| 202 | contains a C++ interface to the conservative garbage collector.
|
---|
| 203 | </para>
|
---|
[3bbd5fe9] | 204 | <indexterm zone="gc libgccpp">
|
---|
[b3bb56b] | 205 | <primary sortas="c-libgccpp">libgccpp.so</primary>
|
---|
[3bbd5fe9] | 206 | </indexterm>
|
---|
| 207 | </listitem>
|
---|
| 208 | </varlistentry>
|
---|
[4e143323] | 209 |
|
---|
[3bbd5fe9] | 210 | </variablelist>
|
---|
[4e143323] | 211 |
|
---|
[3bbd5fe9] | 212 | </sect2>
|
---|
[4e143323] | 213 |
|
---|
[3bbd5fe9] | 214 | </sect1>
|
---|