[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 |
|
---|
[acdc8b01] | 7 | <!ENTITY gc-download-http "https://www.hboehm.info/gc/gc_source/gc-&gc-version;.tar.gz">
|
---|
[8057fc4] | 8 | <!ENTITY gc-download-ftp " ">
|
---|
[49887e8] | 9 | <!ENTITY gc-md5sum "4878e629f482600f2060f30853c7b415">
|
---|
[663957f] | 10 | <!ENTITY gc-size "1.1 MB">
|
---|
[2593c4a] | 11 | <!ENTITY gc-buildsize "11 MB (with tests)">
|
---|
[b8bc70d] | 12 | <!ENTITY gc-time "0.2 SBU (with tests)">
|
---|
[3bbd5fe9] | 13 | ]>
|
---|
| 14 |
|
---|
| 15 | <sect1 id="gc" xreflabel="GC-&gc-version;">
|
---|
| 16 | <?dbhtml filename="gc.html"?>
|
---|
| 17 |
|
---|
| 18 | <sect1info>
|
---|
| 19 | <date>$Date$</date>
|
---|
| 20 | </sect1info>
|
---|
| 21 |
|
---|
| 22 | <title>GC-&gc-version;</title>
|
---|
| 23 |
|
---|
| 24 | <indexterm zone="gc">
|
---|
| 25 | <primary sortas="a-GC">GC</primary>
|
---|
| 26 | </indexterm>
|
---|
| 27 |
|
---|
| 28 | <sect2 role="package">
|
---|
| 29 | <title>Introduction to GC</title>
|
---|
| 30 |
|
---|
[b3bb56b] | 31 | <para>
|
---|
| 32 | The <application>GC</application> package contains the Boehm-Demers-Weiser
|
---|
| 33 | conservative garbage collector, which can be used as a garbage collecting
|
---|
| 34 | replacement for the C malloc function or C++ new operator. It allows you
|
---|
| 35 | to allocate memory basically as you normally would, without explicitly
|
---|
| 36 | deallocating memory that is no longer useful. The collector automatically
|
---|
| 37 | recycles memory when it determines that it can no longer be otherwise
|
---|
| 38 | accessed. The collector is also used by a number of programming language
|
---|
| 39 | implementations that either use C as intermediate code, want to facilitate
|
---|
| 40 | easier interoperation with C libraries, or just prefer the simple
|
---|
| 41 | collector interface. Alternatively, the garbage collector may be used as a
|
---|
| 42 | leak detector for C or C++ programs, though that is not its primary goal.
|
---|
| 43 | </para>
|
---|
| 44 |
|
---|
[453910f] | 45 | &lfs111_checked;
|
---|
[d4796f8b] | 46 |
|
---|
[3bbd5fe9] | 47 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
| 48 | <itemizedlist spacing="compact">
|
---|
| 49 | <listitem>
|
---|
[4355dbcf] | 50 | <para>
|
---|
| 51 | Download (HTTP): <ulink url="&gc-download-http;"/>
|
---|
| 52 | </para>
|
---|
[3bbd5fe9] | 53 | </listitem>
|
---|
| 54 | <listitem>
|
---|
[4355dbcf] | 55 | <para>
|
---|
| 56 | Download (FTP): <ulink url="&gc-download-ftp;"/>
|
---|
| 57 | </para>
|
---|
[3bbd5fe9] | 58 | </listitem>
|
---|
| 59 | <listitem>
|
---|
[4355dbcf] | 60 | <para>
|
---|
| 61 | Download MD5 sum: &gc-md5sum;
|
---|
| 62 | </para>
|
---|
[3bbd5fe9] | 63 | </listitem>
|
---|
| 64 | <listitem>
|
---|
[4355dbcf] | 65 | <para>
|
---|
| 66 | Download size: &gc-size;
|
---|
| 67 | </para>
|
---|
[3bbd5fe9] | 68 | </listitem>
|
---|
| 69 | <listitem>
|
---|
[4355dbcf] | 70 | <para>
|
---|
| 71 | Estimated disk space required: &gc-buildsize;
|
---|
| 72 | </para>
|
---|
[3bbd5fe9] | 73 | </listitem>
|
---|
| 74 | <listitem>
|
---|
[4355dbcf] | 75 | <para>
|
---|
| 76 | Estimated build time: &gc-time;
|
---|
| 77 | </para>
|
---|
[3bbd5fe9] | 78 | </listitem>
|
---|
| 79 | </itemizedlist>
|
---|
| 80 |
|
---|
[946f08a] | 81 | <bridgehead renderas="sect4">Optional</bridgehead>
|
---|
| 82 | <para role="optional">
|
---|
[663957f] | 83 | <xref linkend="libatomic_ops"/>
|
---|
| 84 | </para>
|
---|
[1039de3] | 85 |
|
---|
[b3bb56b] | 86 | <para condition="html" role="usernotes">
|
---|
| 87 | User Notes: <ulink url="&blfs-wiki;/gc"/>
|
---|
| 88 | </para>
|
---|
[3bbd5fe9] | 89 | </sect2>
|
---|
| 90 |
|
---|
| 91 | <sect2 role="installation">
|
---|
| 92 | <title>Installation of GC</title>
|
---|
| 93 |
|
---|
[b3bb56b] | 94 | <para>
|
---|
| 95 | Install <application>GC</application> by running the following commands:
|
---|
| 96 | </para>
|
---|
[3bbd5fe9] | 97 |
|
---|
[33d86da] | 98 | <screen><userinput>./configure --prefix=/usr \
|
---|
[1eb827c6] | 99 | --enable-cplusplus \
|
---|
| 100 | --disable-static \
|
---|
| 101 | --docdir=/usr/share/doc/gc-&gc-version; &&
|
---|
[3bbd5fe9] | 102 | make</userinput></screen>
|
---|
| 103 |
|
---|
[4355dbcf] | 104 | <para>
|
---|
| 105 | To test the results, issue: <command>make check</command>.
|
---|
| 106 | </para>
|
---|
[3bbd5fe9] | 107 |
|
---|
[b3bb56b] | 108 | <para>
|
---|
| 109 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
| 110 | </para>
|
---|
[3bbd5fe9] | 111 |
|
---|
| 112 | <screen role="root"><userinput>make install &&
|
---|
[33d86da] | 113 | install -v -m644 doc/gc.man /usr/share/man/man3/gc_malloc.3</userinput></screen>
|
---|
[3bbd5fe9] | 114 | </sect2>
|
---|
| 115 |
|
---|
| 116 | <sect2 role="commands">
|
---|
| 117 | <title>Command Explanations</title>
|
---|
| 118 |
|
---|
[4355dbcf] | 119 | <para>
|
---|
[f1d7196] | 120 | <parameter>--docdir=/usr/share/doc/gc-&gc-version;</parameter>:
|
---|
[33d86da] | 121 | This option is used so the package will install the
|
---|
[4355dbcf] | 122 | documentation in a versioned directory.
|
---|
| 123 | </para>
|
---|
| 124 |
|
---|
[b3bb56b] | 125 | <para>
|
---|
| 126 | <parameter>--enable-cplusplus</parameter>: This parameter enables the
|
---|
[8558044] | 127 | building and installing of the C++ library along with the standard
|
---|
[9f574bb] | 128 | C library.
|
---|
[b3bb56b] | 129 | </para>
|
---|
[4e143323] | 130 |
|
---|
| 131 | <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
|
---|
| 132 | href="../../xincludes/static-libraries.xml"/>
|
---|
| 133 |
|
---|
[3bbd5fe9] | 134 | </sect2>
|
---|
| 135 |
|
---|
| 136 | <sect2 role="content">
|
---|
| 137 | <title>Contents</title>
|
---|
| 138 |
|
---|
| 139 | <segmentedlist>
|
---|
[c3c56b2] | 140 | <segtitle>Installed Programs</segtitle>
|
---|
[3bbd5fe9] | 141 | <segtitle>Installed Libraries</segtitle>
|
---|
| 142 | <segtitle>Installed Directories</segtitle>
|
---|
| 143 |
|
---|
| 144 | <seglistitem>
|
---|
[c3c56b2] | 145 | <seg>
|
---|
| 146 | None
|
---|
| 147 | </seg>
|
---|
[b3bb56b] | 148 | <seg>
|
---|
[8558044] | 149 | libcord.so,
|
---|
[33d86da] | 150 | libgc.so, and
|
---|
[b3bb56b] | 151 | libgccpp.so
|
---|
| 152 | </seg>
|
---|
| 153 | <seg>
|
---|
| 154 | /usr/include/gc and
|
---|
[bfefc696] | 155 | /usr/share/doc/gc-&gc-version;
|
---|
[b3bb56b] | 156 | </seg>
|
---|
[3bbd5fe9] | 157 | </seglistitem>
|
---|
| 158 | </segmentedlist>
|
---|
| 159 |
|
---|
| 160 | <variablelist>
|
---|
| 161 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
| 162 | <?dbfo list-presentation="list"?>
|
---|
| 163 | <?dbhtml list-presentation="table"?>
|
---|
| 164 |
|
---|
[7d50f20] | 165 | <varlistentry id="libcord">
|
---|
| 166 | <term><filename class="libraryfile">libcord.so</filename></term>
|
---|
| 167 | <listitem>
|
---|
| 168 | <para>
|
---|
[eed90c8] | 169 | contains a tree-based string library
|
---|
[7d50f20] | 170 | </para>
|
---|
| 171 | <indexterm zone="gc libcord">
|
---|
| 172 | <primary sortas="c-libcord">libcord.so</primary>
|
---|
| 173 | </indexterm>
|
---|
| 174 | </listitem>
|
---|
| 175 | </varlistentry>
|
---|
| 176 |
|
---|
[3bbd5fe9] | 177 | <varlistentry id="libgc">
|
---|
[4355dbcf] | 178 | <term><filename class="libraryfile">libgc.so</filename></term>
|
---|
[3bbd5fe9] | 179 | <listitem>
|
---|
[b3bb56b] | 180 | <para>
|
---|
| 181 | contains a C interface to the conservative garbage collector,
|
---|
[4c24eb0a] | 182 | primarily designed to replace the C malloc function
|
---|
[b3bb56b] | 183 | </para>
|
---|
[3bbd5fe9] | 184 | <indexterm zone="gc libgc">
|
---|
[b3bb56b] | 185 | <primary sortas="c-libgc">libgc.so</primary>
|
---|
[3bbd5fe9] | 186 | </indexterm>
|
---|
| 187 | </listitem>
|
---|
| 188 | </varlistentry>
|
---|
| 189 |
|
---|
| 190 | <varlistentry id="libgccpp">
|
---|
[4355dbcf] | 191 | <term><filename class="libraryfile">libgccpp.so</filename></term>
|
---|
[3bbd5fe9] | 192 | <listitem>
|
---|
[b3bb56b] | 193 | <para>
|
---|
[4c24eb0a] | 194 | contains a C++ interface to the conservative garbage collector
|
---|
[b3bb56b] | 195 | </para>
|
---|
[3bbd5fe9] | 196 | <indexterm zone="gc libgccpp">
|
---|
[b3bb56b] | 197 | <primary sortas="c-libgccpp">libgccpp.so</primary>
|
---|
[3bbd5fe9] | 198 | </indexterm>
|
---|
| 199 | </listitem>
|
---|
| 200 | </varlistentry>
|
---|
[4e143323] | 201 |
|
---|
[3bbd5fe9] | 202 | </variablelist>
|
---|
[4e143323] | 203 |
|
---|
[3bbd5fe9] | 204 | </sect2>
|
---|
[4e143323] | 205 |
|
---|
[3bbd5fe9] | 206 | </sect1>
|
---|