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).
This commit is contained in:
Tim Janik
2000-12-29 02:16:51 +00:00
committed by Tim Janik
parent ab31e0c3ce
commit 782a8e2e7c
31 changed files with 1845 additions and 1158 deletions

View File

@@ -21,7 +21,6 @@
#include "gtypeplugin.h"
#include <string.h>
#undef FIXME_DISABLE_PREALLOCATIONS
/* NOTE: some functions (some internal variants and exported ones)
* invalidate data portions of the TypeNodes. if external functions/callbacks
@@ -753,10 +752,11 @@ type_data_make (TypeNode *node,
data->instance.class_data = info->class_data;
data->instance.class = NULL;
data->instance.instance_size = info->instance_size;
data->instance.n_preallocs = MIN (info->n_preallocs, 1024);
#ifdef FIXME_DISABLE_PREALLOCATIONS
#ifdef DISABLE_MEM_POOLS
data->instance.n_preallocs = 0;
#endif
#else /* !DISABLE_MEM_POOLS */
data->instance.n_preallocs = MIN (info->n_preallocs, 1024);
#endif /* !DISABLE_MEM_POOLS */
data->instance.instance_init = info->instance_init;
data->instance.mem_chunk = NULL;
}