Commit Graph

10 Commits

Author SHA1 Message Date
Alberto Garcia
7693b0af44 [tests] Remove C++ style comments
It makes the IBM XL C Compiler (the 'native' non-free compiler
on the AIX 5.3 and 6.1 platform) stop compiling with syntax error.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=581300

Signed-off-by: Javier Jardón <jjardon@gnome.org>
2010-01-20 18:58:32 +01:00
Hans Breuer
770b29bad2 define PCRE_STATIC to reflect the inclusion of pcre as LIB, not
2007-03-17  Hans Breuer  <hans@breuer.org>

	* glib/makefile.msc.in glib/pcre/makefile.msc 
	  glib/update-pcre/update.sh : define PCRE_STATIC to reflect the 
	inclusion of pcre as LIB, not stand-alone DLL. Also set NEWLINE=-1
	to match any newline by default, use of ../../build/win32/make.msc

	* glib/gregex.h : minimal includes of <glib/*.H> instead of <glib.h>

	* glib/gnulib/makefile.msc : make use of ../../build/win32/make.msc

	* tests/regex-test.c(verbose): don't pass a string containing '%' 
	as first parameter to g_print ()
	(test_match) : for the unexpected case output pattern and string
	escaped

	* tests/child-test.c tests/slice-color.c : fix c99ism
	* tests/slice-test.c : fix c99ism and gccism
	* tests/mapping-test.c tests/base-64-tests.c : don't 
	#include <unistd.h> unconditionally
	* tests/option-test.c : use G_GINT64_CONSTANT() instead of direct LL

	* tests/makefile.msc.in : more tests build


svn path=/trunk/; revision=5423
2007-03-17 09:49:09 +00:00
Tim Janik
1bd8993451 implemented static debugging hash-tree to validate slice adresses and
Thu Dec 28 12:50:31 2006  Tim Janik  <timj@imendio.com>

        * glib/gslice.h, glib/gslice.c: implemented static debugging
        hash-tree to validate slice adresses and sizes with G_SLICE=debug-blocks.
        use abort() to exit in mem_error() to allow catching of these in gdb.
        abort programs with a descriptive error message if g_thread_init() is
        called after GSlice was in use. previously this just silently corrupted
        the magazines.

        * glib/ghash.c (struct _GHashNode): reordered fields to keep 8-byte
        pointer alignment on 64bit systems and request smaller slice sizes
        on 32bit systems.

        * tests/slice-test.c: support '~' option flag to introduce slice
        allocation/release corruption with a significant probability. this
        allowes testing of G_SLICE=debug-blocks.
2006-12-28 11:50:43 +00:00
Tor Lillqvist
94322b96da Use g_get_current_time() insted of gettimeofday().
2006-07-24  Tor Lillqvist  <tml@novell.com>

	* tests/slice-test.c: Use g_get_current_time() insted of
	gettimeofday().
2006-07-24 12:42:18 +00:00
Behdad Esfahbod
8741c8bf5a Check the return value of g_get_prgname for NULL before passing to strcmp.
2006-04-05  Behdad Esfahbod  <behdad@gnome.org>

        * tests/option-test.c: Check the return value of g_get_prgname for
        NULL before passing to strcmp.

        * tests/slice-test.c: Report the correct name in Usage summary.
2006-04-05 05:56:47 +00: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
Matthias Clasen
47d2ef18ea Fix C99isms. (#324950, Dan Yefimov)
2005-12-25  Matthias Clasen  <mclasen@redhat.com>

        * tests/slice-test.c: Fix C99isms.  (#324950, Dan Yefimov)
2005-12-26 04:59:34 +00:00
Tim Janik
3f9d65375e 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.
2005-12-20 17:35:02 +00:00
Tim Janik
2731276269 extended to perform the benchmarking on the old memchunk code if 'O' is
Fri Dec  2 10:55:07 2005  Tim Janik  <timj@imendio.com>

        * tests/slice-test.c: extended to perform the benchmarking on the old
        memchunk code if 'O' is selected.

        * tests/memchunks.c: new file which contains the old GLib mem chunks
        implementation with prefix old_mem_chunk_.

        * tests/Makefile.am: added memchunks.c
2005-12-02 09:57:06 +00:00
Tim Janik
733b1789c1 new slice allocator implementation.
Thu Dec  1 17:32:46 2005  Tim Janik  <timj@imendio.com>

        * glib/gslice.[hc]: new slice allocator implementation.

        * tests/slice-test.c: added random slice allocation test.

        * glib/gthread.[hc]: removed newly added private thread mem API.

        * glib/gthreadinit.h:
        * glib/gmessages.c:
        * glib/gthread.c:
        * glib/gmem.c: divided glib threading initialisation into three phases,
        initialisation where private keys and messaging are not available (only
        needed by gmem.c), initialisation without messaging but private keys
        available (gslice.c, gmessage.c), and full fledged initialisers that
        server the rest of glib. initialisation functions got renamed to reflect
        the limitations of their corresponding phases.

        * glib/gmem.c: removed memchunk code, defer allocations to
        g_slice_* instead.

        * glib/gmem.[hc]: removed g_slice_* skeletons.

        * glib/glib.symbols: added g_slice_* symbols.

        * configure.in: check for availability of posix_memalign(3), memalign(3)
        and valloc(3).

        * glib/Makefile.am: added gslice.[hc].
2005-12-01 16:34:33 +00:00