Пример #1
0
/**
 * Print memory usage statistics
 */
void
mem_stats_print (void)
{
  mem_heap_stats_print ();

  mem_pools_stats_t stats;
  mem_pools_get_stats (&stats);

  printf ("Pools stats:\n");
  printf ("  Chunk size: %zu\n"
          "  Pools: %zu\n"
          "  Allocated chunks: %zu\n"
          "  Free chunks: %zu\n"
          "  Peak pools: %zu\n"
          "  Peak allocated chunks: %zu\n\n",
          MEM_POOL_CHUNK_SIZE,
          stats.pools_count,
          stats.allocated_chunks,
          stats.free_chunks,
          stats.peak_pools_count,
          stats.peak_allocated_chunks);
} /* mem_stats_print */
Пример #2
0
/**
 * Print memory usage statistics
 */
void
mem_stats_print (void)
{
  mem_heap_stats_print ();
  mem_pools_stats_print ();
} /* mem_stats_print */