pike.git / src / array.c

version» Context lines:

pike.git/src/array.c:1527:    free_svalues(ITEM(a), a->size, a->type_field);    a->size=0;       if(!(next=a->next))    fatal("Null pointer in array list.\n");       free_array(a);    a=next;    } while (a != & empty_array);   } +  + void count_memory_in_arrays(INT32 *num_, INT32 *size_) + { +  INT32 num=0, size=0; +  struct array *m; +  for(m=empty_array.next;m!=&empty_array;m=m->next) +  { +  num++; +  size+=sizeof(struct array)+ +  sizeof(struct svalue) * (m->malloced_size - 1); +  } +  *num_=num; +  *size_=size; + }