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