• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/Security-55471.14.18/libsecurity_asn1/lib/

Lines Matching refs:stats

72 #define COUNT(pool,what)  (pool)->stats.what++
95 memset(&pool->stats, 0, sizeof pool->stats);
96 pool->stats.name = strdup(name);
97 pool->stats.next = arena_stats_list;
98 arena_stats_list = &pool->stats;
288 PLArenaStats *stats, **statsp;
290 if (pool->stats.name)
291 PR_DELETE(pool->stats.name);
292 for (statsp = &arena_stats_list; (stats = *statsp) != 0;
293 statsp = &stats->next) {
294 if (stats == &pool->stats) {
295 *statsp = stats->next;
314 pool->stats.nallocs++;
315 pool->stats.nbytes += nb;
316 if (nb > pool->stats.maxalloc)
317 pool->stats.maxalloc = nb;
318 pool->stats.variance += nb * nb;
324 pool->stats.ninplace++;
330 pool->stats.ngrows++;
331 pool->stats.nbytes += incr;
332 pool->stats.variance -= size * size;
334 if (size > pool->stats.maxalloc)
335 pool->stats.maxalloc = size;
336 pool->stats.variance += size * size;
341 pool->stats.nreleases++;
346 pool->stats.nfastrels++;
354 PLArenaStats *stats;
357 for (stats = arena_stats_list; stats; stats = stats->next) {
358 if (stats->nallocs != 0) {
359 mean = (double)stats->nbytes / stats->nallocs;
360 variance = fabs(stats->variance / stats->nallocs - mean * mean);
365 fprintf(fp, "\n%s allocation statistics:\n", stats->name);
366 fprintf(fp, " number of arenas: %u\n", stats->narenas);
367 fprintf(fp, " number of allocations: %u\n", stats->nallocs);
368 fprintf(fp, " number of free arena reclaims: %u\n", stats->nreclaims);
369 fprintf(fp, " number of malloc calls: %u\n", stats->nmallocs);
370 fprintf(fp, " number of deallocations: %u\n", stats->ndeallocs);
371 fprintf(fp, " number of allocation growths: %u\n", stats->ngrows);
372 fprintf(fp, " number of in-place growths: %u\n", stats->ninplace);
373 fprintf(fp, "number of released allocations: %u\n", stats->nreleases);
374 fprintf(fp, " number of fast releases: %u\n", stats->nfastrels);
375 fprintf(fp, " total bytes allocated: %u\n", stats->nbytes);
378 fprintf(fp, " maximum allocation size: %u\n", stats->maxalloc);