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.121 2000/08/13 15:12:55 grubba Exp $"); + RCSID("$Id: gc.c,v 1.122 2000/08/16 10:35:48 grubba 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:592:   {    int ret;    found_in=data;    found_in_type=t;    ret=gc_check(x);    found_in_type=T_UNKNOWN;    found_in=0;    return ret;   }    + /* Avoid loss of precision warning. */ + #ifdef __ECL + static inline long SIZE_T_TO_LONG(size_t x) + { +  return DO_NOT_WARN((long)x); + } + #else /* !__ECL */ + #define SIZE_T_TO_LONG(x) ((long)(x)) + #endif /* __ECL */ +    void low_describe_something(void *a,    int t,    int indent,    int depth,    int flags)   {    struct program *p=(struct program *)a;    struct marker *m;       if(depth<0) return;
pike.git/src/gc.c:677:    }    for(pos=0;pos<100;pos++)    {    tmp=get_line(p->program+pos, p, &line);    if(tmp && line)    {    fprintf(stderr,"%*s**Location: %s:%ld\n",indent,"",tmp,(long)line);    foo=1;    break;    } -  if(pos+1>=(long)p->num_program) +  if(pos+1>=(ptrdiff_t)p->num_program)    break;    }   #if 0    if(!foo && p->num_linenumbers>1 && EXTRACT_UCHAR(p->linenumbers)=='\177')    {    fprintf(stderr,"%*s**From file: %s\n",indent,"",p->linenumbers+1);    foo=1;    }   #endif   
pike.git/src/gc.c:702:    for(e=0;e<p->num_identifier_references;e++)    fprintf(stderr,"%*s**** %s\n",indent,"",ID_FROM_INT(p,e)->name->str);       fprintf(stderr,"%*s**num inherits: %d\n",indent,"",p->num_inherits);    }       if(flags & DESCRIBE_MEM)    {   #define FOO(NUMTYPE,TYPE,NAME) \    fprintf(stderr, "%*s* " #NAME " %p[%ld]\n", \ -  indent, "", p->NAME, (long)p->PIKE_CONCAT(num_,NAME)); +  indent, "", p->NAME, SIZE_T_TO_LONG(p->PIKE_CONCAT(num_,NAME)));   #include "program_areas.h"    }       break;    }       case T_MULTISET:    fprintf(stderr,"%*s**Describing array of multiset:\n",indent,"");    debug_dump_array(((struct multiset *)a)->ind);    break;