A class template redefining the behavior of the Chusov::Memory::allocator class template so that the deallocation function randomizes the memory before the deallocation. More...
#include <chsvmemex.h>
Public Member Functions | |
secure_allocator ()=default | |
A compiler-generated default constructor. More... | |
secure_allocator (const secure_allocator< T > &refRight)=default | |
Compiler-generated copy constructor. More... | |
template<class U > | |
secure_allocator (const secure_allocator< U > &refRight) noexcept | |
A copy constructor called over the allocator object of type, that is another instantiation of the Chusov::Memory::allocator template. More... | |
void | deallocate (typename allocator< T >::pointer p, typename allocator< T >::size_type n) |
Randomizes and deallocates a pointed memory. More... | |
![]() | |
allocator ()=default | |
A compiler-generated default constructor. More... | |
allocator (const allocator< T > &refRight)=default | |
Compiler-generated copy constructor. More... | |
template<class U > | |
allocator (const allocator< U > &refRight) noexcept | |
A copy constructor called over the allocator object of type, that is another instantiation of the Chusov::Memory::allocator template. More... | |
pointer | address (reference obj) const noexcept |
Returns an address of an object, passed, by reference, as a parameter. More... | |
const_pointer | address (const_reference obj) const noexcept |
Returns an address of an object, passed, by reference, as a parameter. More... | |
pointer | allocate (size_type n, allocator< void >::const_pointer=0) |
Allocates an uninitialized memory to hold the specified number of objects of the type T . More... | |
void | deallocate (pointer p, size_type) |
Deallocates a pointed memory. More... | |
size_type | max_size () const noexcept |
Returns a maximum number of objects of the T type, that can be allocated theoretically, that is SIZE_MAX / sizeof(T). | |
template<class U , class ... arg_t> | |
void | construct (U *p, arg_t &&...args) |
template<class U > | |
void | destroy (U *p) |
Destroys an object, pointed to by the parameter. The method does not deallocate the occupied memory, as it is performed by the deallocate method. More... | |
Additional Inherited Members | |
![]() | |
typedef T | value_type |
A type of an element managed by the allocator. | |
typedef T * | pointer |
A type of a pointer to an element managed by the allocator. | |
typedef const T * | const_pointer |
A type of a constant pointer to an element managed by the allocator. | |
typedef T & | reference |
A type of a reference to an element managed by the allocator. | |
typedef const T & | const_reference |
A type of a constant reference to an element managed by the allocator. | |
typedef std::size_t | size_type |
typedef std::ptrdiff_t | difference_type |
A type of an integer value specifying difference between two pointers to memory, managed by the allocator. | |
typedef std::true_type | propagate_on_container_move_assignment |
Allows movement. | |
A class template redefining the behavior of the Chusov::Memory::allocator class template so that the deallocation function randomizes the memory before the deallocation.
T | is a type of an element kept in memory managed by the allocator. |