pike.git / src / gc.c

version» Context lines:

pike.git/src/gc.c:23:   #include "constants.h"   #include "interpret.h"   #include "bignum.h"      #include "gc.h"   #include "main.h"   #include <math.h>      #include "block_alloc.h"    - RCSID("$Id: gc.c,v 1.139 2000/09/30 19:21:44 mast Exp $"); + RCSID("$Id: gc.c,v 1.140 2000/10/04 05:12:12 hubbe Exp $");      /* Run garbage collect approximately every time    * 20 percent of all arrays, objects and programs is    * garbage.    */      #define GC_CONST 20   #define MIN_ALLOC_THRESHOLD 1000   #define MAX_ALLOC_THRESHOLD 10000000   #define MULTIPLIER 0.9
pike.git/src/gc.c:278:    else if (m->data == (struct mapping_data *) something)    return T_MAPPING_DATA;       for(mu=first_multiset;mu;mu=mu->next)    if(mu==(struct multiset *)something)    return T_MULTISET;       if(safe_debug_findstring((struct pike_string *)something))    return T_STRING;    -  return T_UNKNOWN; +  return PIKE_T_UNKNOWN;   }      void *check_for =0;   static char *found_where="";   static void *found_in=0;   static int found_in_type=0;   void *gc_svalue_location=0;   char *fatal_after_gc=0;   int gc_debug = 0;   
pike.git/src/gc.c:320:    if(real_type!=-1) memblock=real_memblock;      #ifdef DEBUG_MALLOC    if(memblock == 0 || type == -1)    {    extern void *dmalloc_find_memblock_base(void *);    memblock=dmalloc_find_memblock_base(location);    }   #endif    -  if(type==T_UNKNOWN) +  if(type==PIKE_T_UNKNOWN)    type=attempt_to_identify(memblock);       if(memblock)    fprintf(stderr,"%*s-> from %s %p offset %ld\n",    indent,"",    get_name_of_type(type),    memblock,    DO_NOT_WARN((long)((char *)location - (char *)memblock)));    else    fprintf(stderr,"%*s-> at location %p in unknown memblock (mmaped?)\n",    indent,"",    location);          if(memblock && depth>0)    describe_something(memblock,type,indent+2,depth-1,flags | DESCRIBE_MEM);       again:    switch(type)    { -  case T_UNKNOWN: +  case PIKE_T_UNKNOWN:    for(p=first_program;p;p=p->next)    {    if(memblock == (void *)p->program)    {    fprintf(stderr,"%*s **In memory block for program at %p\n",    indent,"",    p);    memblock=p;    type=T_PROGRAM;    goto again;
pike.git/src/gc.c:545:    found_where?found_where:"");    describe_location(found_in , found_in_type, gc_svalue_location,0,1,0);    fprintf(stderr,"----------end------------\n");   }      void debug_gc_xmark_svalues(struct svalue *s, ptrdiff_t num, char *fromwhere)   {    found_in=(void *)fromwhere;    found_in_type=-1;    gc_xmark_svalues(s,num); -  found_in_type=T_UNKNOWN; +  found_in_type=PIKE_T_UNKNOWN;    found_in=0;   }      void debug_gc_check_svalues(struct svalue *s, ptrdiff_t num, TYPE_T t, void *data)   {    found_in=data;    found_in_type=t;    gc_check_svalues(s,num); -  found_in_type=T_UNKNOWN; +  found_in_type=PIKE_T_UNKNOWN;    found_in=0;   }      void debug_gc_check_weak_svalues(struct svalue *s, ptrdiff_t num, TYPE_T t, void *data)   {    found_in=data;    found_in_type=t;    gc_check_weak_svalues(s,num); -  found_in_type=T_UNKNOWN; +  found_in_type=PIKE_T_UNKNOWN;    found_in=0;   }      void debug_gc_check_short_svalue(union anything *u, TYPE_T type, TYPE_T t, void *data)   {    found_in=data;    found_in_type=t;    gc_check_short_svalue(u,type); -  found_in_type=T_UNKNOWN; +  found_in_type=PIKE_T_UNKNOWN;    found_in=0;   }      void debug_gc_check_weak_short_svalue(union anything *u, TYPE_T type, TYPE_T t, void *data)   {    found_in=data;    found_in_type=t;    gc_check_weak_short_svalue(u,type); -  found_in_type=T_UNKNOWN; +  found_in_type=PIKE_T_UNKNOWN;    found_in=0;   }      int debug_low_gc_check(void *x, TYPE_T t, void *data)   {    int ret;    found_in=data;    found_in_type=t;    ret=gc_check(x); -  found_in_type=T_UNKNOWN; +  found_in_type=PIKE_T_UNKNOWN;    found_in=0;    return ret;   }      /* Avoid loss of precision warning. */   #ifdef __ECL   static inline unsigned long SIZE_T_TO_ULONG(size_t x)   {    return DO_NOT_WARN((unsigned long)x);   }