From cdc52b773e09ab0c0a650fdd06c4e20cb5b90e15 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 23 Dec 2002 06:06:14 +0000 Subject: --with-gc enables now support for Boehm's GC, if it's found and glib2 is used. This also enables an extra check for perl library to verify scripts aren't using objects that have already been free'd - while not a fully safe solution it's much better than before :) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3063 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/irssi.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/fe-text/irssi.c') diff --git a/src/fe-text/irssi.c b/src/fe-text/irssi.c index fbb3e0c1..d0bbbc99 100644 --- a/src/fe-text/irssi.c +++ b/src/fe-text/irssi.c @@ -309,6 +309,17 @@ static void winsock_init(void) } #endif +#ifdef HAVE_GC +#include +GMemVTable gc_mem_table = { + GC_malloc, + GC_realloc, + GC_free, + + NULL, NULL, NULL +}; +#endif + int main(int argc, char **argv) { static struct poptOption options[] = { @@ -316,6 +327,10 @@ int main(int argc, char **argv) { NULL, '\0', 0, NULL } }; +#ifdef HAVE_GC + g_mem_set_vtable(&gc_mem_table); +#endif + dummy = FALSE; quitting = FALSE; core_init_paths(argc, argv); -- cgit v1.2.3