pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.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: stralloc.c,v 1.213 2007/11/11 13:18:53 nilsson Exp $ + || $Id: stralloc.c,v 1.214 2008/05/01 21:44:33 mast Exp $   */      #include "global.h"   #include "stralloc.h"   #include "pike_macros.h"   #include "dynamic_buffer.h"   #include "pike_macros.h"   #include "pike_memory.h"   #include "pike_error.h"   #include "gc.h"
pike.git/src/stralloc.c:2029: Inside #if defined(DO_PIKE_CLEANUP)
   while(all_shared_string_locations)    {    struct shared_string_location *x=all_shared_string_locations;    all_shared_string_locations=x->next;    free_string(x->s);    x->s=0;    }       if (exit_with_cleanup)    { -  INT32 num,size; +  size_t num,size;    count_memory_in_strings(&num,&size);    if(num)    { -  fprintf(stderr,"Strings left: %d (%d bytes) (zapped)\n",num,size); +  fprintf(stderr,"Strings left: %"PRINTSIZET"d " +  "(%"PRINTSIZET"d bytes) (zapped)\n",num,size);   #ifdef PIKE_DEBUG    dump_stralloc_strings();   #endif    }    }   #endif       for(e=0;e<htable_size;e++)    {    LOCK_BUCKET(e);
pike.git/src/stralloc.c:2067:    base_table=0;    num_strings=0;      #ifdef DO_PIKE_CLEANUP    free_all_short_pike_string0_blocks();    free_all_short_pike_string1_blocks();    free_all_short_pike_string2_blocks();   #endif /* DO_PIKE_CLEANUP */   }    - void count_memory_in_strings(INT32 *num, INT32 *size) + void count_memory_in_strings(size_t *num, size_t *size)   { -  unsigned INT32 e, num_=0, size_=0; +  unsigned INT32 e; +  size_t num_=0, size_=0;    if(!base_table)    {    *num=*size=0;    return;    }    size_+=htable_size * sizeof(struct pike_string *);    for(e=0;e<htable_size;e++)    {    struct pike_string *p;    LOCK_BUCKET(e);