Commit Graph

7 Commits

Author SHA1 Message Date
Philip Withnall
d2062f0a65 docs: Drop pointless leading whitespace
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-15 15:11:43 +00:00
Philip Withnall
ac396b4dc1 docs: Drop outdated timestamp and sign-off line
See the git history for that instead.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-15 15:11:43 +00:00
Philip Withnall
855aea45c6 docs: Update debugging docs to mention Meson build options
The behaviour of the Meson build has changed a little vs what we did in
autotools. In autotools, --enable-debug was a tristate (yes, no,
undefined), with all three options resulting in different macro
definitions.

In Meson, we have a bistate of --buildtype={debug,debugoptimized} vs
--buildtype=(anything else). There is no way to automatically define
G_DISABLE_ASSERT or G_DISABLE_CHECKS while building GLib — you need to
define them in your CPPFLAGS in your environment instead.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-01-15 15:11:43 +00:00
Christoph Reiter
3aa23078ac build: Remove the --disable-mem-pools build option and the DISABLE_MEM_POOLS macro
It's mostly not used anymore and doesn't do what it says it does.

The docs state that it affects GList, GSList, GNode, GMemChunks, GSignal,
GType n_preallocs and GBSearchArray while:

* GList, GSList and GNode use GSlice and are not affected
* GMemChunks is gone
* GType npreallocs is ignored

It also states that it can be used to force the usage of g_malloc/g_free,
which is handled by G_SLICE=always-malloc now.

The only places where it's used is in signal handling through GBSearchArray
and in GValueArray (deprecated). Since it's unlikely that anyone wants to
reduce allocation sizes just for those cases remove the build option.
2018-06-02 09:45:55 +02:00
Christoph Reiter
118332dd5c Remove unused ENABLE_GC_FRIENDLY_DEFAULT and its build option
ENABLE_GC_FRIENDLY_DEFAULT was supposed to set the default for the gc friendliness
while still allowing to force enable it at runtime with G_DEBUG=gc-friendly.

With commit 943a18b564 (6 years ago) things were changed to always set it
according to the content of G_DEBUG in glib_init(), making the default unused.

Since nobody complained since then just remove the macro and the build option.
2018-05-31 07:19:12 +02:00
Tim Janik
eda944bca5 honour g_mem_gc_friendly settings when freeing slices, make sure
Wed Jan 25 16:39:18 2006  Tim Janik  <timj@imendio.com>

        * glib/gslice.c: honour g_mem_gc_friendly settings when freeing
        slices, make sure g_mem_gc_friendly is properly initialized.

        * gmem.[hc]: ensure g_mem_gc_friendly is initialized from G_DEBUG upon
        the first allocation. applied some branching optimizations.

        * docs/macros.txt: reflected --enable-gc-friendly change and
        described ENABLE_GC_FRIENDLY_DEFAULT as well as G_DEBUG=gc-friendly.

        * configure.in: changed --enable-gc-friendly=yes to define
        ENABLE_GC_FRIENDLY_DEFAULT.

        * glib/garray.c: changed ENABLE_GC_FRIENDLY macro #ifdef-s to
        if (G_UNLIKELY (g_mem_gc_friendly)).

        * glib/gtree.c:
        * glib/ghash.c: removed ENABLE_GC_FRIENDLY code which is now taken
        care of by g_slice_free1().

        * tests/slice-test.c: fixed leaks, reported by Kjartan Maraas.
2006-01-25 15:51:43 +00:00
Tim Janik
782a8e2e7c got rid of outdated dmalloc support. provide g_try_malloc() and
Thu Dec 28 10:21:46 2000  Tim Janik  <timj@gtk.org>

        * gmem.[hc]: got rid of outdated dmalloc support. provide g_try_malloc()
        and g_try_realloc() which _may_ fail and return NULL.
        nuked g_mem_check(), provided GMemVTable for memory function
        virtualization, alterable at program startup with g_mem_set_vtable().
        provided glib_mem_profiler_table and g_mem_profile() to support limited
        profiling information out of the box (uses mprotect() for free()ed areas
        on linux).
        provide globally visible G_MEM_ALIGN.
        buncha cleanups.

        * docs/macros.txt: file to get a clue about the various configuration
        macros.

        * docs/debugging.txt: explain debugging traps.

        * configure.in: got rid of --enable-mem-check and --enable-mem-profile,
        define GLIB_SIZEOF_VOID_P and GLIB_SIZEOF_LONG. check malloc prototypes
        and define SANE_MALLOC_PROTOS is we can use them.
        <boy, is this file a mess>

        * gutils.c, gscanner.c: fix up compatibility warnings, use g_message().


Thu Dec 28 11:36:44 2000  Tim Janik  <timj@gtk.org>

        * gbsearcharray.c (upper_power2): disable G_BSEARCH_ALIGN_POWER2
        fucntionality if DISABLE_MEM_POOLS is defined.

        * gtype.c: honour DISABLE_MEM_POOLS.

        * gsignal.c (g_signal_init): flag signal key bsearch array with
        G_BSEARCH_ALIGN_POWER2 to avoid excessive growth time. honour
        DISABLE_MEM_POOLS.

        * gparam.h: added G_PARAM_READWRITE alias for (G_PARAM_READABLE |
                                                       G_PARAM_WRITABLE).
2000-12-29 02:16:51 +00:00