2004-03-15
2004-03-15 19:03:48 by Martin Stjernholm <mast@lysator.liu.se>
-
884c12d95b431d40f9016e8434b0f4f9d5e87e40
(12 lines)
(+9/-3)
[
Show
| Annotate
]
Branch: 7.9
Print the number of found refs in locate_references.
Rev: src/gc.c:1.240
2:
|| 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.239 2004/03/15 14:07:39 mast Exp $
+ || $Id: gc.c,v 1.240 2004/03/15 19:03:48 mast Exp $
*/
#include "global.h"
33:
#include "block_alloc.h"
- RCSID("$Id: gc.c,v 1.239 2004/03/15 14:07:39 mast Exp $");
+ RCSID("$Id: gc.c,v 1.240 2004/03/15 19:03:48 mast Exp $");
int gc_enabled = 1;
337:
void *check_for =0;
void *gc_svalue_location=0;
+ static size_t found_ref_count;
+
char *fatal_after_gc=0;
#ifdef DEBUG_MALLOC
716: Inside #if defined(PIKE_DEBUG)
static void gdb_gc_stop_here(void *a, int weak)
{
+ found_ref_count++;
fprintf(stderr,"***One %sref found%s. ",
weak ? "weak " : "",
gc_found_place ? gc_found_place : "");
1618: Inside #if defined(PIKE_DEBUG)
fprintf(stderr,"**Looking for references to %p:\n", a);
check_for=a;
+ found_ref_count = 0;
GC_ENTER (NULL, PIKE_T_UNKNOWN) {
mark_externals();
1640: Inside #if defined(PIKE_DEBUG)
}
#endif
- fprintf(stderr,"**Done looking for references to %p.\n", a);
+ fprintf(stderr,"**Done looking for references to %p, "
+ "found %"PRINTSIZET"d refs.\n", a, found_ref_count);
Pike_in_gc = orig_in_gc;
if(i) exit_gc();