#include <locking_allocator.h>
Definition at line 19 of file locking_allocator.h.
◆ mlock_allocator() [1/3]
◆ mlock_allocator() [2/3]
◆ mlock_allocator() [3/3]
| Botan::mlock_allocator::mlock_allocator |
( |
| ) |
|
|
noexcept |
◆ ~mlock_allocator()
| Botan::mlock_allocator::~mlock_allocator |
( |
| ) |
|
◆ allocate()
| void * Botan::mlock_allocator::allocate |
( |
size_t | num_elems, |
|
|
size_t | elem_size ) |
Definition at line 17 of file locking_allocator.cpp.
17 {
18 if(!m_pool) {
19 return nullptr;
20 }
21
23 return m_pool->allocate(n.value());
24 } else {
25
26 return nullptr;
27 }
28}
constexpr std::optional< T > checked_mul(T a, T b)
References Botan::checked_mul().
◆ deallocate()
| bool Botan::mlock_allocator::deallocate |
( |
void * | p, |
|
|
size_t | num_elems, |
|
|
size_t | elem_size ) |
|
noexcept |
Definition at line 30 of file locking_allocator.cpp.
30 {
31 if(!m_pool) {
32 return false;
33 }
34
36 return m_pool->deallocate(p, n.value());
37 } else {
38
39
40
41
42 return false;
43 }
44}
References Botan::checked_mul().
◆ instance()
◆ operator=() [1/2]
◆ operator=() [2/2]
The documentation for this class was generated from the following files: