pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:19:      #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.109 2000/12/01 08:09:55 hubbe Exp $"); + RCSID("$Id: stralloc.c,v 1.110 2000/12/01 17:43:28 grubba 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:1675: Inside #if defined(PIKE_DEBUG) && defined(DEBUG_MALLOC)
   {    INT32 num,size;    count_memory_in_strings(&num,&size);    if(num)    {    fprintf(stderr,"Strings left: %d (%d bytes) (zapped)\n",num,size);    dump_stralloc_strings();    }    }   #endif +     for(e=0;e<htable_size;e++)    {    for(s=base_table[e];s;s=next)    {    next=s->next;   #ifdef REALLY_FREE    really_free_pike_string(s);   #else    s->next=0;   #endif    }    base_table[e]=0;    }    free((char *)base_table);    base_table=0;    num_strings=0; -  +  + #ifdef DEBUG_MALLOC +  free_all_short_pike_string0_blocks(); +  free_all_short_pike_string1_blocks(); +  free_all_short_pike_string2_blocks(); + #endif DEBUG_MALLOC   }      void count_memory_in_strings(INT32 *num, INT32 *size)   {    unsigned INT32 e, num_=0, size_=0;    if(!base_table)    {    *num=*size=0;    return;    }