|
stdex
Additional custom or not Standard C++ covered algorithms
|
An allocator template that sanitizes each memory block before it is destroyed or reallocated. More...
#include <stdex/memory.hpp>
Classes | |
| struct | rebind |
| Convert this type to sanitizing_allocator<T2> More... | |
Public Member Functions | |
| sanitizing_allocator () noexcept | |
| Construct default allocator. | |
| sanitizing_allocator (const sanitizing_allocator< T > &other) | |
| Construct by copying. | |
| template<class T2 > | |
| sanitizing_allocator (const sanitizing_allocator< T2 > &other) noexcept | |
| Construct from a related allocator. | |
| void | deallocate (T *const p, const std::size_t n) |
| Deallocate object at p sanitizing its content first. | |
An allocator template that sanitizes each memory block before it is destroyed or reallocated.
sanitizing_allocator introduces a performance penalty. However, it provides an additional level of security. Use for security sensitive data memory storage only.