pike.git / src / main.c

version» Context lines:

pike.git/src/main.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: main.c,v 1.199 2004/04/06 15:37:55 nilsson Exp $ + || $Id: main.c,v 1.200 2004/04/18 02:16:05 mast Exp $   */      #include "global.h" - RCSID("$Id: main.c,v 1.199 2004/04/06 15:37:55 nilsson Exp $"); + RCSID("$Id: main.c,v 1.200 2004/04/18 02:16:05 mast Exp $");   #include "fdlib.h"   #include "backend.h"   #include "module.h"   #include "object.h"   #include "language.h"   #include "lex.h"   #include "pike_types.h"   #include "builtin_functions.h"   #include "array.h"   #include "stralloc.h"
pike.git/src/main.c:1059:    struct TYPE *x; \    for (x = START; x; x = x->next) { \    struct marker *m = find_marker (x); \    if (m) { \    int is_static = 0; \    static const struct TYPE *statics[] = STATICS; \    ptrdiff_t i; /* Use signed type to avoid warnings from gcc. */ \    for (i = 0; i < (ptrdiff_t) NELEM (statics); i++) \    if (x == statics[i]) \    is_static = 1; \ -  while (x->refs > m->refs + is_static) \ +  while (x->refs > m->refs + is_static) { \ +  m->flags |= GC_CLEANUP_FREED; \    PIKE_CONCAT(free_, TYPE) (x); \    } \ -  +  } \    } \    } while (0)       ZAP_LINKED_LIST_LEAKS (array, first_array, STATIC_ARRAYS);    ZAP_LINKED_LIST_LEAKS (multiset, first_multiset, {});    ZAP_LINKED_LIST_LEAKS (mapping, first_mapping, {});    ZAP_LINKED_LIST_LEAKS (program, first_program, {});    ZAP_LINKED_LIST_LEAKS (object, first_object, {});      #undef ZAP_LINKED_LIST_LEAKS       /* If we stumble on the real refs whose refcounts we've zapped    * above we should try to handle it gracefully. */    gc_external_refs_zapped = 1;    -  gc_keep_markers = 0; +     do_gc (NULL, 1);    -  +  gc_keep_markers = 0; +  exit_gc(); +    #ifdef DEBUG_MALLOC    {    INT32 num, size;    count_memory_in_pike_types(&num, &size);    if (num)    fprintf(stderr, "Types left: %d (%d bytes)\n", num, size);    describe_all_types();    }   #endif    }