2008-03-30
2008-03-30 01:24:10 by Martin Stjernholm <mast@lysator.liu.se>
-
97a7333c48de302d9229917e163bd5b62a1fcad1
(15 lines)
(+8/-7)
[
Show
| Annotate
]
Branch: 7.9
More work on fixing gc integration with types. More refinements of the leak
report.
Rev: src/gc.c:1.304
Rev: src/gc.h:1.130
Rev: src/module.c:1.51
Rev: src/pike_types.c:1.319
Rev: src/pike_types.h:1.112
Rev: src/svalue.c:1.239
Rev: src/svalue.h:1.156
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.303 2008/03/29 18:58:22 mast Exp $
+ || $Id: gc.c,v 1.304 2008/03/30 01:24:09 mast Exp $
*/
#include "global.h"
1482:
}
default:
- fprintf(stderr, "%*s**Cannot describe block of unknown type %d\n",
- indent, "", t);
+ fprintf(stderr, "%*s**Cannot describe block of type %s (%d)\n",
+ indent, "", get_name_of_type (t), t);
}
}
1871: Inside #if defined(DO_PIKE_CLEANUP)
size_t e=0;
if (gc_keep_markers) {
- /* Carry over any GC_CLEANUP_FREED flags but reinitialize them
+ /* Carry over any GC_CLEANUP_LEAKED flags but reinitialize them
* otherwise. */
for(e=0;e<marker_hash_table_size;e++) {
struct marker *m;
for (m = marker_hash_table[e]; m; m = m->next) {
#ifdef PIKE_DEBUG
- m->flags &= GC_CLEANUP_FREED;
+ m->flags &= GC_CLEANUP_LEAKED;
m->xrefs = 0;
m->saved_refs = -1;
#else
1940: Inside #if defined(PIKE_DEBUG)
PMOD_EXPORT void gc_check_zapped (void *a, TYPE_T type, const char *file, int line)
{
struct marker *m = find_marker (a);
- if (m && (m->flags & GC_CLEANUP_FREED))
+ if (m && (m->flags & GC_CLEANUP_LEAKED))
fprintf (stderr, "Free of leaked %s %p from %s:%d, %d refs remaining\n",
get_name_of_type (type), a, file, line, *(INT32 *)a - 1);
}
1987: Inside #if defined(PIKE_DEBUG)
gc_check_all_mappings();
gc_check_all_programs();
gc_check_all_objects();
- debug_gc_check_all_types();
+ gc_check_all_types();
} GC_LEAVE;
#ifdef DEBUG_MALLOC