Files
allocators/include/malunal/allocators/arena.h
T

25 lines
810 B
C

/**
* @file arena.h
* @brief Contains the definition of an arena allocator and all the functions
* needed to utilize it.
* @author John Christman (sorakatadzuma@gmail.com)
* @copyright Malunal Studios, LLC.
*/
#include "../allocators.h"
#ifndef MALUNAL_ALLOCATORS_ARENA_HEADER
#define MALUNAL_ALLOCATORS_ARENA_HEADER
/**
* @brief Resets the entire arena without freeing its pages.
* @details This will iterate through each of the pages acquired for the arena
* setting the usage of each page to zero. This will allow the arena to
* overwrite the data within the pages.
* @param arena The arena to reset.
* @returns An exception if the arena could not be reset.
*/
allocation_error_t
arena_reset(allocator_mptr_t arena);
#endif /* MALUNAL_ALLOCATORS_ARENA_HEADER */