📄 building.sgml
字号:
</listitem> <listitem> <para> </para> </listitem> <listitem> <para> When growing a GArray, Glib will clear the new chunk of memory. Grow an array from 7 bytes to 10 bytes, and the last 3 bytes will be cleared. </para> </listitem> <listitem> <para> The above applies to GPtrArray as well. </para> </listitem> <listitem> <para> When freeing a node from a GHashTable, Glib will first clear the node, which used to have pointers to the key and the value stored at that node. </para> </listitem> <listitem> <para> When destroying or removing a GTree node, Glib will clear the node, which used to have pointers to the node's value, and the left and right subnodes. </para> </listitem> </itemizedlist> <para> Since clearing the memory has a cost, <systemitem>--disable-gc-friendly</systemitem> is the default. </para> <formalpara> <title><systemitem>--disable-mem-pools</systemitem> and <systemitem>--enable-mem-pools</systemitem></title> <para> Many small chunks of memory are often allocated via collective pools in GLib and are cached after release to speed up reallocations. For sparse memory systems this behaviour is often inferior, so memory pools can be disabled to avoid excessive caching and force atomic maintenance of chunks through the <function>g_malloc()</function> and <function>g_free()</function> functions. Code currently affected by this: <itemizedlist> <listitem> <para> <structname>GList</structname>, <structname>GSList</structname>, <structname>GNode</structname>, <structname>GHash</structname> allocations. The functions g_list_push_allocator(), g_list_pop_allocator(), g_slist_push_allocator(), g_slist_pop_allocator(), g_node_push_allocator() and g_node_pop_allocator() are not available </para> </listitem> <listitem> <para> <structname>GMemChunk</structname>s become basically non-effective </para> </listitem> <listitem> <para> <structname>GSignal</structname> disables all caching (potentially very slow) </para> </listitem> <listitem> <para> <structname>GType</structname> doesn't honour the <structname>GTypeInfo</structname> <structfield>n_preallocs</structfield> field anymore </para> </listitem> <listitem> <para> the <structname>GBSearchArray</structname> flag <literal>G_BSEARCH_ALIGN_POWER2</literal> becomes non-functional </para> </listitem> </itemizedlist> </para> </formalpara> <formalpara> <title><systemitem>--disable-threads</systemitem> and <systemitem>--enable-threads</systemitem></title> <para> Do not compile GLib to be multi thread safe. GLib will be slightly faster then. This is however not recommended, as many programs rely on GLib being multi thread safe. </para> </formalpara> <formalpara> <title><systemitem>--with-threads</systemitem></title> <para> Specify a thread implementation to use. <itemizedlist> <listitem><para> 'posix' and 'dce' can be used interchangeable to mean the different versions of Posix threads. configure tries to find out, which one is installed. </para></listitem> <listitem><para> 'none' means that GLib will be thread safe, but does not have a default thread implementation. This has to be supplied to <function>g_thread_init()</function> by the programmer. </para></listitem> </itemizedlist> </para> </formalpara> <formalpara> <title><systemitem>--disable-regex</systemitem> and <systemitem>--enable-regex</systemitem></title> <para> Do not compile GLib with regular expression support. GLib will be smaller because it will not need the PCRE library. This is however not recommended, as programs may need GRegex. </para> </formalpara> <formalpara> <title><systemitem>--with-pcre</systemitem></title> <para> Specify whether to use the internal or the system-supplied PCRE library. <itemizedlist> <listitem><para> 'internal' means that GRegex will be compiled to use the internal PCRE library. </para></listitem> <listitem><para> 'system' means that GRegex will be compiled to use the system-supplied PCRE library. </para></listitem> </itemizedlist> Using the internal PCRE is the preferred solution: <itemizedlist> <listitem> <para> System-supplied PCRE has a separated copy of the big tables used for Unicode handling. </para> </listitem> <listitem> <para> Some systems have PCRE libraries compiled without some needed features, such as UTF-8 and Unicode support. </para> </listitem> <listitem> <para> PCRE uses some global variables for memory management and other features. In the rare case of a program using both GRegex and PCRE (maybe indirectly through a library), this variables could lead to problems when they are modified. </para> </listitem> </itemizedlist> </para> </formalpara> <formalpara> <title><systemitem>--disable-included-printf</systemitem> and <systemitem>--enable-included-printf</systemitem></title> <para> By default the <command>configure</command> script will try to auto-detect whether the C library provides a suitable set of <function>printf()</function> functions. In detail, <command>configure</command> checks that the semantics of <function>snprintf()</function> are as specified by C99 and that positional parameters as specified in the Single Unix Specification are supported. If this not the case, GLib will include an implementation of the <function>printf()</function> family. These options can be used to explicitly control whether an implementation fo the <function>printf()</function> family should be included or not. </para> </formalpara> <formalpara> <title><systemitem>--disable-visibility</systemitem> and <systemitem>--enable-visibility</systemitem></title> <para> By default, GLib uses ELF visibility attributes to optimize PLT table entries if the compiler supports ELF visibility attributes. A side-effect of the way in which this is currently implemented is that any header change forces a full recompilation, and missing includes may go unnoticed. Therefore, it makes sense to turn this feature off while doing GLib development, even if the compiler supports ELF visibility attributes. The <option>--disable-visibility</option> option allows to do that. </para> </formalpara> <formalpara> <title><systemitem>--disable-gtk-doc</systemitem> and <systemitem>--enable-gtk-doc</systemitem></title> <para> By default the <command>configure</command> script will try to auto-detect whether the <application>gtk-doc</application> package is installed. If it is, then it will use it to extract and build the documentation for the GLib library. These options can be used to explicitly control whether <application>gtk-doc</application> should be used or not. If it is not used, the distributed, pre-generated HTML files will be installed instead of building them on your machine. </para> </formalpara> <formalpara> <title><systemitem>--disable-man</systemitem> and <systemitem>--enable-man</systemitem></title> <para> By default the <command>configure</command> script will try to auto-detect whether <application>xsltproc</application> and the necessary Docbook stylesheets are installed. If they are, then it will use them to rebuild the included man pages from the XML sources. These options can be used to explicitly control whether man pages should be rebuilt used or not. The distribution includes pre-generated man pages. </para> </formalpara> <formalpara> <title><systemitem>--disable-xattr</systemitem> and <systemitem>--enable-xattr</systemitem></title> <para> By default the <command>configure</command> script will try to auto-detect whether the getxattr() family of functions is available. If it is, then extended attribute support will be included in GIO. These options can be used to explicitly control whether extended attribute support should be included or not. getxattr() and friends can be provided by glibc or by the standalone libattr library. </para> </formalpara> <formalpara> <title><systemitem>--disable-selinux</systemitem> and <systemitem>--enable-selinux</systemitem></title> <para> By default the <command>configure</command> script will auto-detect if libselinux is available and include SELinux support in GIO if it is. These options can be used to explicitly control whether SELinxu support should be included. </para> </formalpara> </refsect1></refentry>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -