libcopp
1.1.0
|
memory allocator this allocator will maintain buffer using malloc/free function More...
#include <stack_allocator_malloc.h>
Public Member Functions | |
stack_allocator_malloc () UTIL_CONFIG_NOEXCEPT | |
~stack_allocator_malloc () | |
void | allocate (stack_context &ctx, std::size_t size) UTIL_CONFIG_NOEXCEPT |
void | deallocate (stack_context &ctx) UTIL_CONFIG_NOEXCEPT |
memory allocator this allocator will maintain buffer using malloc/free function
Definition at line 23 of file stack_allocator_malloc.h.
copp::allocator::stack_allocator_malloc::stack_allocator_malloc | ( | ) |
Definition at line 25 of file stack_allocator_malloc.cpp.
copp::allocator::stack_allocator_malloc::~stack_allocator_malloc | ( | ) |
Definition at line 26 of file stack_allocator_malloc.cpp.
void copp::allocator::stack_allocator_malloc::allocate | ( | stack_context & | ctx, |
std::size_t | size | ||
) |
allocate memory and attach to stack context [standard function]
ctx | stack context |
size | stack size |
Definition at line 28 of file stack_allocator_malloc.cpp.
References copp::stack_traits::maximum_size(), copp::stack_traits::minimum_size(), and copp::stack_traits::round_to_page_size().
void copp::allocator::stack_allocator_malloc::deallocate | ( | stack_context & | ctx | ) |
deallocate memory from stack context [standard function]
ctx | stack context |
Definition at line 49 of file stack_allocator_malloc.cpp.
References copp::stack_traits::is_unbounded(), copp::stack_traits::maximum_size(), and copp::stack_traits::minimum_size().