memory_arena
Loading...
Searching...
No Matches
Functions
arena_internal.c File Reference

Internal utilities and metadata management for the Arena memory system. More...

#include "arena.h"
#include <stdbool.h>
+ Include dependency graph for arena_internal.c:

Go to the source code of this file.

Functions

bool arena_is_valid (const t_arena *arena)
 Check whether the given arena is in a valid, initialized state.
 
void arena_stats_reset (t_arena_stats *stats)
 Reset the given statistics structure to zero.
 
void arena_update_peak (t_arena *arena)
 Update the arena’s peak memory usage if the current usage exceeds it.
 
void arena_zero_metadata (t_arena *arena)
 Zero out and reset all debug/stats metadata associated with the arena.
 
size_t default_grow_cb (size_t current_size, size_t requested_size)
 Default growth policy callback for arena resizing.
 

Detailed Description

Internal utilities and metadata management for the Arena memory system.

Author
Toonsa
Date
2025

This file contains internal helper functions used by the arena allocator to manage memory growth, statistics, state validation, and metadata resets. These utilities are not intended for direct use by external applications.

Features implemented in this file:

These functions are used throughout the arena implementation during initialization, allocation, and cleanup phases.

Note
All functions in this file are considered part of the @ingroup arena_internal. They are designed to be stable within the implementation.

Definition in file arena_internal.c.