pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:2139:    if (s->len <= SHORT_STRING_THRESHOLD)    switch (s->size_shift) {    case 0: return sizeof (struct short_pike_string0);    case 1: return sizeof (struct short_pike_string1);    default: return sizeof (struct short_pike_string2);    }    else    return sizeof (struct pike_string_hdr) + ((s->len + 1) << s->size_shift);   }    + void count_memory_in_short_pike_strings(size_t *num, size_t *size) + { +  size_t num_=0, size_=0; +  count_memory_in_short_pike_string0s(num, size); +  count_memory_in_short_pike_string1s(&num_, &size_); +  *num += num_; +  *size += size_; +  count_memory_in_short_pike_string2s(&num_, &size_); +  *num += num_; +  *size += size_; + } +    void count_memory_in_strings(size_t *num, size_t *size)   {    unsigned INT32 e;    size_t num_=0, size_=0;    if(!base_table)    {    *num=*size=0;    return;    }    size_+=htable_size * sizeof(struct pike_string *);