added mem_error() and mem_assert() to test and handle errors without
authorTim Janik <timj@imendio.com>
Tue, 20 Dec 2005 17:35:02 +0000 (17:35 +0000)
committerTim Janik <timj@src.gnome.org>
Tue, 20 Dec 2005 17:35:02 +0000 (17:35 +0000)
commit3f9d65375e46a49e3be7bf1ca7533b3a9ac310b4
treeb72c6b38ce800c2b7555931f90c1e61f4386fd50
parent86f1c798b27fcfd9e1c4edc9632dc288e6a1f32c
added mem_error() and mem_assert() to test and handle errors without

Tue Dec 20 18:14:14 2005  Tim Janik  <timj@imendio.com>

        * glib/gslice.[hc]: added mem_error() and mem_assert() to test and
        handle  errors without depending on gmessage.c which might not be
        setup when the error occours.
        removed G_SLICE_CONFIG_ALWAYS_FREE config option, fixed the code so
        always freeing can be achieved by adjusting the working set time to
        0 with G_SLICE_CONFIG_WORKING_SET_MSECS.
        added G_SLICE_CONFIG_COLOR_INCREMENT to test different color increments
        (mainly 0 and 1). reduced the minimum block size to 128 bytes, to
        minimize wastage if small amounts of differently sized structrues are
        allocated, this does come at a performance cost of roughly 5% though.
        fixed up block alignment calculation, so it works for varying
        block sizes. only use strerror() not g_strerror() since the latter
        depends on working GQuark and GSlice.
        mem_error(): implemented in terms of fprintf and vfprintf.

        * tests/slice-color.c: new program to test cache colorization effects.

        * tests/slice-test.c: trade G_SLICE_CONFIG_ALWAYS_FREE for 0 duration
        G_SLICE_CONFIG_WORKING_SET_MSECS.
ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-12
glib/gslice.c
glib/gslice.h
tests/Makefile.am
tests/slice-color.c [new file with mode: 0644]
tests/slice-test.c