|
memory_arena
|
Runtime statistics tracking and diagnostics for memory arenas. More...
#include <stddef.h>#include <stdio.h>
Include dependency graph for arena_stats.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Data Structures | |
| struct | s_arena_stats |
| Structure holding runtime statistics for an arena. More... | |
Typedefs | |
| typedef struct s_arena | t_arena |
| typedef struct s_arena_stats | t_arena_stats |
| Structure holding runtime statistics for an arena. | |
Functions | |
| t_arena_stats | arena_get_stats (const t_arena *arena) |
| Return a snapshot of the arena's internal statistics. | |
| void | arena_print_stats (t_arena *arena, FILE *stream) |
| Print formatted diagnostics about the arena to a stream. | |
| void | arena_stats_record_growth (t_arena_stats *stats, size_t size) |
Append a new growth event to the growth_history array. | |
| void | arena_stats_reset (t_arena_stats *stats) |
| Reset the given statistics structure to zero. | |
Runtime statistics tracking and diagnostics for memory arenas.
This module defines the t_arena_stats structure and a set of utility functions to introspect and manage arena memory usage. It enables users to track allocation metrics, debug issues, and monitor arena behavior over time.
Features include:
Use this module to:
arena_print_stats)arena_get_stats)arena_stats_record_growth, arena_stats_reset)Definition in file arena_stats.h.
Definition at line 72 of file arena_stats.h.