pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:87:    * GC_PASS_ZAP_WEAK    * Zap weak references to unmarked objects.    *    * GC_PASS_POSTTOUCH    * Debug.    *    * GC_PASS_FREE    * Free remaining unmarked objects.    *    * GC_PASS_KILL -  * Destruct remaining unmarked live (lfun::destroy()) objects. +  * Destruct remaining unmarked live (lfun::_destruct()) objects.    *    * GC_PASS_DESTRUCT    * Destruct objects to destruct.    *    * And the following simulated passes:    *    * GC_PASS_LOCATE    *    * GC_PASS_DISABLED    */
pike.git/src/gc.c:142:    * to save them by adding external references to them. However, it's    * not possible for live objects to save themselves or other live    * objects; all live objects that didn't have external references at    * the start of the gc pass will be destructed regardless of added    * references.    *    * Things that have only weak external references at the start of the    * gc pass will be freed. That's done before the live object destruct    * pass. Internal weak references are however still intact.    * -  * Note: Keep the doc for lfun::destroy up-to-date with the above. +  * Note: Keep the doc for lfun::_destruct up-to-date with the above.    */      /* #define GC_DEBUG */   /* #define GC_VERBOSE */   /* #define GC_CYCLE_DEBUG */   /* #define GC_STACK_DEBUG */   /* #define GC_INTERVAL_DEBUG */      #if defined(GC_VERBOSE) && !defined(PIKE_DEBUG)   #undef GC_VERBOSE
pike.git/src/gc.c:4052:    {    cpu_time_t gc_end_time = get_cpu_time();    if (gc_end_time > gc_start_time)    last_gc_time = gc_end_time - gc_start_time;    else    last_gc_time = (cpu_time_t) -1;    }       /* At this point, unreferenced contains the number of things that    * were without external references during the check and mark -  * passes. In the process of freeing them, destroy functions might +  * passes. In the process of freeing them, _destruct functions might    * have been called which means anything might have happened.    * Therefore we use that figure instead of the difference between    * the number of allocated things to measure the amount of    * garbage. */    last_garbage_ratio = (double) unreferenced / start_num_objs;       objects_alloced = objects_alloced * multiplier +    start_allocs * (1.0 - multiplier);    objects_freed = objects_freed * multiplier +    unreferenced * (1.0 - multiplier);