pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.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: gc.c,v 1.276 2006/07/05 02:17:09 mast Exp $ + || $Id: gc.c,v 1.277 2006/08/05 22:30:14 mast Exp $   */      #include "global.h"      struct callback *gc_evaluator_callback=0;      #include "array.h"   #include "multiset.h"   #include "mapping.h"   #include "object.h"
pike.git/src/gc.c:325:   #define INIT_BLOCK(X) \    (X)->flags=(X)->refs=(X)->weak_refs=(X)->xrefs=0; \    (X)->saved_refs=-1; \    (X)->frame = 0;   #else   #define INIT_BLOCK(X) \    (X)->flags=(X)->refs=(X)->weak_refs=0; \    (X)->frame = 0;   #endif    - #ifdef PIKE_DEBUG +    #undef get_marker   #define get_marker debug_get_marker   #undef find_marker   #define find_marker debug_find_marker - #endif +       PTR_HASH_ALLOC_FIXED_FILL_PAGES(marker,2)    -  + #undef get_marker + #define get_marker(X) ((struct marker *) debug_malloc_pass(debug_get_marker(X))) + #undef find_marker + #define find_marker(X) ((struct marker *) debug_malloc_pass(debug_find_marker(X))) +  + PMOD_EXPORT struct marker *pmod_get_marker (void *p) + { +  return debug_get_marker (p); + } +  + PMOD_EXPORT struct marker *pmod_find_marker (void *p) + { +  return debug_find_marker (p); + } +    #if defined (PIKE_DEBUG) || defined (GC_MARK_DEBUG)   void *gc_found_in = NULL;   int gc_found_in_type = PIKE_T_UNKNOWN;   const char *gc_found_place = NULL;   #endif      #ifdef DO_PIKE_CLEANUP   /* To keep the markers after the gc. Only used for the leak report at exit. */   int gc_keep_markers = 0;   PMOD_EXPORT int gc_external_refs_zapped = 0;   #endif      #ifdef PIKE_DEBUG    - #undef get_marker - #define get_marker(X) ((struct marker *) debug_malloc_pass(debug_get_marker(X))) - #undef find_marker - #define find_marker(X) ((struct marker *) debug_malloc_pass(debug_find_marker(X))) -  +    int gc_in_cycle_check = 0;   static unsigned delayed_freed, weak_freed, checked, marked, cycle_checked, live_ref;   static unsigned max_gc_stack_frames, live_rec, frame_rot, link_search;   static unsigned gc_extra_refs = 0;      static unsigned max_tot_gc_stack_frames = 0;   static unsigned tot_cycle_checked = 0, tot_live_rec = 0, tot_frame_rot = 0;      static int gc_is_watching = 0;