pike.git / src / program.c

version» Context lines:

pike.git/src/program.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: program.c,v 1.719 2008/06/10 13:56:51 grubba Exp $ + || $Id: program.c,v 1.720 2008/06/23 16:41:02 mast Exp $   */      #include "global.h"   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "lex.h"
pike.git/src/program.c:3763:    * during a gc pass. The gc assumes that the references are enumerated    * in the same order in that case.    *    * The callback is called after any mapped variables on the object    * have been recursed (and possibly freed).    *    * If there are pointers to allocated memory that you keep track of on    * the C level then you should add something like this to the recurse    * callback so that Pike.count_memory remains accurate:    * -  * if (mc_count_bytes (Pike_fp->current_storage)) +  * if (mc_count_bytes (Pike_fp->current_object))    * mc_counted_bytes += <size of the allocated memory block(s)>    *    * If the allocated memory is shared between objects then it gets more    * complicated and you need to write visit_thing_fn callbacks. See    * e.g. visit_mapping and visit_mapping_data for how to do that.    *    * This function is obsolete; see pike_set_prog_event_callback for    * details.    */   PMOD_EXPORT void set_gc_recurse_callback(void (*m)(struct object *))