4#ifndef IT_D4NP_MEMORYPOOL_POOL_HARDENING_HPP_
5#define IT_D4NP_MEMORYPOOL_POOL_HARDENING_HPP_
43#if PBR_MEMORY_POOL_HARDENING
45namespace it::d4np::memorypool {
Public C API for the pbr-cpp-memory-pool fixed-block-size allocator.
constexpr const char * HARDENING_FREELIST_CORRUPTION
A free-list slot's guard or next-link was corrupted (integrity check).
constexpr const char * HARDENING_DOUBLE_FREE
The same block was freed twice (its guard still read as freed).
HardeningViolationHandler hardening_violation_handler() noexcept
void(*)(const char *kind, const void *block) noexcept HardeningViolationHandler
Handler invoked when the hardening layer detects a violation.
constexpr const char * HARDENING_OVERFLOW
A contiguous write past block_size corrupted the trailing guard word.
constexpr const char * HARDENING_USE_AFTER_FREE
A write to a freed block's poisoned payload was detected on allocation.
HardeningViolationHandler set_hardening_violation_handler(HardeningViolationHandler handler) noexcept
Install handler as the hardening violation handler and return the previous one.