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.171 2003/04/01 19:41:13 mast Exp $ + || $Id: main.c,v 1.172 2003/04/02 21:03:53 mast Exp $   */      #include "global.h" - RCSID("$Id: main.c,v 1.171 2003/04/01 19:41:13 mast Exp $"); + RCSID("$Id: main.c,v 1.172 2003/04/02 21:03:53 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:829:   }      void exit_main(void)   {   #ifdef DO_PIKE_CLEANUP    /* Destruct all remaining objects before modules are shut down, so    * that they don't get calls to object exit callbacks after their    * module exit callback. The downside is that the leak report below    * will always report destructed objects. */    cleanup_objects(); +  +  /* Unload dynamic modules before static ones. */ +  exit_dynamic_load();   #endif   }      void init_main(void)   {   }      void low_exit_main(void)   {   #ifdef DO_PIKE_CLEANUP    void exit_iterators(void);    -  +  /* Clear various global references. */ +    #ifdef AUTO_BIGNUM    exit_auto_bignum();   #endif -  +     exit_pike_searching();    th_cleanup();    exit_object(); -  exit_dynamic_load(); +     exit_signals();    exit_builtin();    exit_cpp();    cleanup_interpret();    exit_builtin_constants();    cleanup_module_support();    exit_operators();    exit_iterators();    cleanup_program();    cleanup_compiler();    cleanup_error();    exit_backend();    cleanup_gc();    cleanup_pike_types();    -  +  /* This zaps Pike_interpreter.thread_state among other things, so +  * THREADS_ALLOW/DISALLOW don't work beyond this point. */ +  th_cleanup(); +    #ifdef SHARED_NODES    free(node_hash.table);   #endif /* SHARED_NODES */       exit_pike_security();    free_svalue(& throw_value);    throw_value.type=T_INT;       {   #ifdef DEBUG_MALLOC
pike.git/src/main.c:968:    count_memory_in_pike_types(&num, &size);    if (num)    fprintf(stderr, "Types left: %d (%d bytes)\n", num, size);    describe_all_types();    }    }   #endif       destruct_objects_to_destruct_cb();    +  /* Now there are no arrays/objects/programs/anything left. */ +     really_clean_up_interpret();       cleanup_callbacks();    free_all_callable_blocks();    exit_destroy_called_mark_hash();       cleanup_pike_type_table();    cleanup_shared_string_table();       free_dynamic_load();