pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:18:      #include <errno.h>   #include <float.h>   #include <ctype.h>   #include <math.h>      #ifndef HUGE   #define HUGE HUGE_VAL   #endif /*!HUGE*/    - RCSID("$Id: stralloc.c,v 1.98 2000/08/15 11:41:28 grubba Exp $"); + RCSID("$Id: stralloc.c,v 1.99 2000/09/03 23:20:12 mast Exp $");      #define BEGIN_HASH_SIZE 997   #define MAX_AVG_LINK_LENGTH 3      /* Experimental dynamic hash length */   #ifndef HASH_PREFIX   static unsigned int HASH_PREFIX=64;   static unsigned int need_more_hash_prefix=0;   #endif   
pike.git/src/stralloc.c:1582:    }    }   #ifdef PIKE_DEBUG    if(num_strings != num_)    fatal("Num strings is wrong! %d!=%d.\n",num_strings, num_);   #endif    num[0]=num_;    size[0]=size_;   }    + #ifdef PIKE_DEBUG + unsigned gc_touch_all_strings(void) + { +  unsigned INT32 e; +  unsigned n = 0; +  if (!base_table) return 0; +  for(e=0;e<htable_size;e++) +  { +  struct pike_string *p; +  for(p=base_table[e];p;p=p->next) debug_gc_touch(p), n++; +  } +  return n; + } + #endif +    void gc_mark_all_strings(void)   {    unsigned INT32 e;    if(!base_table) return;    for(e=0;e<htable_size;e++)    {    struct pike_string *p;    for(p=base_table[e];p;p=p->next) gc_is_referenced(p);    }   }