pike.git / src / pike_modules.c

version» Context lines:

pike.git/src/pike_modules.c:139: Inside #if defined(DO_PIKE_CLEANUP) and #if defined(PIKE_THREADS)
  #ifdef PIKE_THREADS    /* This zaps Pike_interpreter.thread_state among other things, so    * THREADS_ALLOW/DISALLOW are NOPs beyond this point. */    th_cleanup();   #endif    free_all_pike_list_node_blocks();       free_svalue(& throw_value);    mark_free_svalue (&throw_value);    -  do_gc(NULL, 1); +  do_gc(1);       if (exit_with_cleanup)    {    int leak_found = 0;      #ifdef PIKE_THREADS    if(count_pike_threads())    {    fprintf(stderr,"Cleanup-on-exit aborted "    "because %d thread(s) still are running.\n",
pike.git/src/pike_modules.c:165: Inside #if defined(DO_PIKE_CLEANUP) and #if defined(DEBUG_MALLOC)
     #ifdef DEBUG_MALLOC    search_all_memheaders_for_references();   #endif       /* The use of markers below only works after a gc run where it    * hasn't freed anything. Since we've destructed all live objects    * in exit_modules, nothing should be left after the run above, so    * only one more run is necessary. */    gc_keep_markers = 1; -  do_gc (NULL, 1); +  do_gc (1);      #define STATIC_ARRAYS &empty_array, &weak_empty_array,      #define REPORT_LINKED_LIST_LEAKS(TYPE, START, STATICS, T_TYPE, NAME, \    PRINT_EXTRA) do { \    struct TYPE *x; \    for (x = START; x; x = x->next) { \    struct marker *m = find_marker (x); \    if (!m) { \    DO_IF_DEBUG ( \
pike.git/src/pike_modules.c:317:       {    size_t index;    for (index = 0; index <= pike_type_hash_size; index++) {    ZAP_LINKED_LIST_LEAKS(pike_type, pike_type_hash[index], NOTHING);    }    }      #undef ZAP_LINKED_LIST_LEAKS    -  do_gc (NULL, 1); +  do_gc (1);       gc_keep_markers = 0;    exit_gc();    }       destruct_objects_to_destruct_cb();       /* Now there are no arrays/objects/programs/anything left. */       really_clean_up_interpret();
pike.git/src/pike_modules.c:484: Inside #if defined(DO_PIKE_CLEANUP)
   if (exit_with_cleanup) {    /* Kill the threads and destruct all remaining objects while we    * have a proper execution environment. The downside is that the    * leak report below will always report destructed objects. We use    * the gc in a special mode for this to get a reasonably sane    * destruct order. */   #ifdef PIKE_THREADS    cleanup_all_other_threads();   #endif    gc_destruct_everything = 1; -  count = do_gc (NULL, 1); +  count = do_gc (1);    while (count) { -  size_t new_count = do_gc (NULL, 1); +  size_t new_count = do_gc (1);    if (new_count >= count) {    fprintf (stderr, "Some _destruct function is creating new objects "    "during final cleanup - can't exit cleanly.\n");    break;    }    count = new_count;    }   #ifdef PIKE_DEBUG    if (!count) {    struct object *o;