pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:22:   #include "time_stuff.h"   #include "constants.h"   #include "interpret.h"      #include "gc.h"   #include "main.h"   #include <math.h>      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.74 2000/04/20 01:49:42 mast Exp $"); + RCSID("$Id: gc.c,v 1.75 2000/04/20 02:41:44 hubbe Exp $");      /* Run garbage collect approximate every time we have    * 20 percent of all arrays, objects and programs is    * garbage.    */      #define GC_CONST 20   #define MIN_ALLOC_THRESHOLD 1000   #define MAX_ALLOC_THRESHOLD 10000000   #define MULTIPLIER 0.9
pike.git/src/gc.c:946:    run_queue(&gc_mark_queue);       if(d_flag)    gc_mark_all_strings();      #ifdef PIKE_DEBUG    check_for=(void *)1;   #endif    Pike_in_gc=5;    /* Now we free the unused stuff */ +  +  /* We do the objects first, that way destroy() +  * won't have to worry about zapped arrays and mappings +  */ +  gc_free_all_unreferenced_objects(); +     gc_free_all_unreferenced_arrays();    gc_free_all_unreferenced_multisets();    gc_free_all_unreferenced_mappings();    gc_free_all_unreferenced_programs(); -  + <<<<<<< gc.c + =======    Pike_in_gc=4;    /* This is intended to happen before the freeing done above. But    * it's put here for the time being, since the problem of non-object    * objects getting external references from destroy code isn't    * solved yet. */    destroyed = gc_destroy_all_unreferenced_objects();    Pike_in_gc=5;    destructed = gc_free_all_unreferenced_objects(); -  + >>>>>>> 1.74      #ifdef PIKE_DEBUG    if (destroyed != destructed)    fatal("destroy() called in %d objects in gc, but %d destructed.\n",    destroyed, destructed);    check_for=0;    if(fatal_after_gc) fatal(fatal_after_gc);   #endif       exit_gc();