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.263 2005/04/06 19:09:45 grubba Exp $ + || $Id: gc.c,v 1.264 2005/04/06 19:18:25 grubba 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:435:    if(p->constants &&    ptr >= (char *)p->constants &&    ptr < (char*)(p->constants+p->num_constants))    {    e = ((char *)ptr - (char *)(p->constants)) /    sizeof(struct program_constant);   #if 0    fprintf(stderr,"%*s **In p->constants[%"PRINTPTRDIFFT"d] (%s)\n",indent,"",    e, p->constants[e].name ? p->constants[e].name->str : "no name");   #else /* !0 */ -  fprintf(stderr,"%*s **In p->constants[%"PRINTPTRDIFFT"d] (%d)\n",indent,"", +  fprintf(stderr,"%*s **In p->constants[%"PRINTPTRDIFFT"d] " +  "(%"PRINTPTRDIFFT"d)\n", +  indent,"",    e, p->constants[e].offset);   #endif /* 0 */    break;    }          if(p->identifiers &&    ptr >= (char *)p->identifiers &&    ptr < (char*)(p->identifiers+p->num_identifiers))    {
pike.git/src/gc.c:840: Inside #if defined(PIKE_DEBUG)
   fputc ('\n', stderr);    var_count++;    }    }       if (!var_count)    fprintf (stderr, "%*s** (none)\n", indent, "");       fprintf(stderr,"%*s**Describing program %p of object:\n",indent,"", p);   #ifdef DEBUG_MALLOC -  if ((int) p == 0x55555555) +  if ((INT32)(ptrdiff_t) p == 0x55555555)    fprintf(stderr, "%*s**Zapped program pointer.\n", indent, "");    else   #endif    low_describe_something(p, T_PROGRAM, indent, depth,    depth ? flags : flags | DESCRIBE_SHORT, 0);       if((p->flags & PROGRAM_USES_PARENT) &&    LOW_PARENT_INFO(((struct object *)a),p)->parent)    {    if (depth) {
pike.git/src/gc.c:994: Inside #if defined(PIKE_DEBUG)
   }       if (!id_count)    fprintf (stderr, "%*s** (none)\n", indent, "");    }       if(flags & DESCRIBE_MEM)    {   #define FOO(NUMTYPE,TYPE,ARGTYPE,NAME) \    fprintf(stderr, "%*s* " #NAME " %p[%"PRINTSIZET"u]\n", \ -  indent, "", p->NAME, p->PIKE_CONCAT(num_,NAME)); +  indent, "", p->NAME, (size_t)p->PIKE_CONCAT(num_,NAME));   #include "program_areas.h"    }       break;    }       case T_MULTISET_DATA: {    int found = 0;    struct multiset *l;    for (l = first_multiset; l; l = l->next) {
pike.git/src/gc.c:1053:    }       case T_MAPPING:    if (((struct mapping *) a)->refs > 0)    debug_dump_mapping((struct mapping *)a);    break;       case T_STRING:    {    struct pike_string *s=(struct pike_string *)a; -  fprintf(stderr,"%*s**size_shift: %d, len: %"PRINTPTRDIFFT"d, hash: %"PRINTSIZET"x\n", -  indent,"", s->len, s->size_shift, s->hval); +  fprintf(stderr,"%*s**size_shift: %d, " +  "len: %"PRINTPTRDIFFT"d, " +  "hash: %"PRINTSIZET"x\n", +  indent,"", s->size_shift, s->len, s->hval);    if (!s->size_shift && s->refs > 0) {    if(s->len>77)    {    fprintf(stderr,"%*s** \"%60s\"...\n",indent,"",s->str);    }else{    fprintf(stderr,"%*s** \"%s\"\n",indent,"",s->str);    }    }    break;    }
pike.git/src/gc.c:1127:    {    fprintf(stderr,"%*s**Location description: %s\n",indent,"",(char *)a);    return;    }       /* Disable debug, this may help reduce recursion bugs */    tmp=d_flag;    d_flag=0;      #ifdef DEBUG_MALLOC -  if (((int)a) == 0x55555555) { +  if (((INT32)(ptrdiff_t)a) == 0x55555555) {    fprintf(stderr,"%*s**Block: %p Type: %s Zapped pointer\n",indent,"",a,    get_name_of_type(t));    } else   #endif /* DEBUG_MALLOC */    if (((ptrdiff_t)a) & 3) {    fprintf(stderr,"%*s**Block: %p Type: %s Misaligned address\n",indent,"",a,    get_name_of_type(t));    } else {    fprintf(stderr,"%*s**Block: %p Type: %s Refs: %d\n",indent,"",a,    get_name_of_type(t),
pike.git/src/gc.c:3233:    if(GC_VERBOSE_DO(1 ||) gc_trace)    {    char timestr[40];    if (last_gc_time != (cpu_time_t) -1)    sprintf (timestr, ", %ld ms",    (long) (last_gc_time / (CPU_TIME_TICKS / 1000)));    else    timestr[0] = 0;   #ifdef DO_PIKE_CLEANUP    if (gc_destruct_everything) -  fprintf(stderr, "done (%"PRINTSIZET"d was destructed)%s\n", +  fprintf(stderr, "done (%u was destructed)%s\n",    destroy_count, timestr);    else   #endif    fprintf(stderr, "done (%"PRINTSIZET"d of %"PRINTSIZET"d "    "was unreferenced)%s\n",    unreferenced, start_num_objs, timestr);    }    }      #ifdef PIKE_DEBUG