Botan 3.8.0
Crypto and TLS for C&
|
#include <mem_pool.h>
Public Member Functions | |
void * | allocate (size_t size) |
bool | deallocate (void *p, size_t size) noexcept |
Memory_Pool (const Memory_Pool &)=delete | |
Memory_Pool (const std::vector< void * > &pages, size_t page_size) | |
Memory_Pool (Memory_Pool &&)=delete | |
Memory_Pool & | operator= (const Memory_Pool &)=delete |
Memory_Pool & | operator= (Memory_Pool &&)=delete |
~Memory_Pool () | |
Definition at line 20 of file mem_pool.h.
Botan::Memory_Pool::Memory_Pool | ( | const std::vector< void * > & | pages, |
size_t | page_size ) |
Initialize a memory pool. The memory is not owned by *this, it must be freed by the caller.
pages | a list of pages to allocate from |
page_size | the system page size, each page should point to exactly this much memory. |
Definition at line 295 of file mem_pool.cpp.
References Botan::clear_bytes(), and Botan::OS::page_prohibit_access().
Referenced by Memory_Pool(), Memory_Pool(), operator=(), and operator=().
Botan::Memory_Pool::~Memory_Pool | ( | ) |
Definition at line 319 of file mem_pool.cpp.
References Botan::OS::page_allow_access().
|
delete |
References Memory_Pool().
|
delete |
References Memory_Pool().
void * Botan::Memory_Pool::allocate | ( | size_t | size | ) |
Definition at line 328 of file mem_pool.cpp.
References BOTAN_ASSERT_NOMSG, Botan::lock(), and Botan::OS::page_allow_access().
|
noexcept |
Definition at line 372 of file mem_pool.cpp.
References Botan::lock(), and Botan::OS::page_prohibit_access().
|
delete |
References Memory_Pool().
|
delete |
References Memory_Pool().