mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +02:00
--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
This commit is contained in:
parent
495501c284
commit
cdc52b773e
3 changed files with 117 additions and 4 deletions
|
|
@ -309,6 +309,17 @@ static void winsock_init(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_GC
|
||||
#include <gc/gc.h>
|
||||
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue