Botan 3.9.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) noexcept | |
Memory_Pool (Memory_Pool &&)=delete | |
Memory_Pool & | operator= (const Memory_Pool &)=delete |
Memory_Pool & | operator= (Memory_Pool &&)=delete |
~Memory_Pool () noexcept |
Definition at line 20 of file mem_pool.h.
|
noexcept |
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 293 of file mem_pool.cpp.
References Botan::clear_bytes(), and Botan::OS::page_prohibit_access().
Referenced by Memory_Pool(), Memory_Pool(), operator=(), and operator=().
|
noexcept |
Definition at line 314 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 323 of file mem_pool.cpp.
References BOTAN_ASSERT_NOMSG, Botan::lock(), and Botan::OS::page_allow_access().
|
noexcept |
Definition at line 367 of file mem_pool.cpp.
References Botan::lock(), and Botan::OS::page_prohibit_access().
|
delete |
References Memory_Pool().
|
delete |
References Memory_Pool().