pike.git / src / pike_modules.c

version» Context lines:

pike.git/src/pike_modules.c:191:    } \    else { \    int is_static = 0; \    /*static const*/ struct TYPE *statics[] = {STATICS NULL}; \    ptrdiff_t i; /* Use signed type to avoid warnings from gcc. */ \    for (i = 0; i < (ptrdiff_t) (NELEM (statics) - 1); i++) \    if (x == statics[i]) \    is_static = 1; \    /* Note: m->xrefs is always zero here since the mark pass \    * isn't run in gc_destruct_everything mode. */ \ -  if (x->refs != m->refs + is_static) { \ +  if (x->refs != m->gc_refs + is_static) { \    if (!leak_found) { \    fputs ("Leak(s) found at exit:\n", stderr); \    leak_found = 1; \    } \    fprintf (stderr, NAME " at %p got %d unaccounted refs " \    "(and %d accounted): ", \ -  x, x->refs - (m->refs + is_static), \ -  m->refs + is_static); \ +  x, x->refs - (m->gc_refs + is_static), \ +  m->gc_refs + is_static); \    safe_print_short_svalue (stderr, (union anything *) &x, T_TYPE); \    {PRINT_EXTRA;} \    fputc ('\n', stderr); \    /* describe (x); */ \    DO_IF_DMALLOC ( \    debug_malloc_dump_references (x, 2, 1, 0); \    fputc ('\n', stderr); \    ); \ -  DO_IF_DEBUG (m->flags |= GC_CLEANUP_LEAKED); \ +  DO_IF_DEBUG (m->gc_flags |= GC_CLEANUP_LEAKED); \    } \    } \    } \    } while (0)       REPORT_LINKED_LIST_LEAKS (array, first_array, STATIC_ARRAYS, T_ARRAY, "Array", {});    REPORT_LINKED_LIST_LEAKS (multiset, first_multiset, NOTHING, T_MULTISET, "Multiset", {});    REPORT_LINKED_LIST_LEAKS (mapping, first_mapping, NOTHING, T_MAPPING, "Mapping", {});    REPORT_LINKED_LIST_LEAKS (    program, first_program, NOTHING, T_PROGRAM, "Program",
pike.git/src/pike_modules.c:295:    next = x->next; \    if (m) { \    int is_static = 0; \    static const struct TYPE *statics[] = {STATICS NULL}; \    ptrdiff_t i; /* Use signed type to avoid warnings from gcc. */ \    INT32 refs; \    for (i = 0; i < (ptrdiff_t) (NELEM (statics) - 1); i++) \    if (x == statics[i]) \    is_static = 1; \    refs = x->refs; \ -  while (refs > m->refs + is_static) { \ +  while (refs > m->gc_refs + is_static) { \    PIKE_CONCAT(free_, TYPE) (x); \    refs--; \    } \    } \    } \    } while (0)       ZAP_LINKED_LIST_LEAKS (array, first_array, STATIC_ARRAYS);    ZAP_LINKED_LIST_LEAKS (multiset, first_multiset, NOTHING);    ZAP_LINKED_LIST_LEAKS (mapping, first_mapping, NOTHING);