libcopp
2.2.0
|
memory allocator this allocator will maintain buffer using malloc/free function More...
#include <stack_allocator_malloc.h>
Public Member Functions | |
stack_allocator_malloc () LIBCOPP_MACRO_NOEXCEPT | |
~stack_allocator_malloc () | |
stack_allocator_malloc (const stack_allocator_malloc &other) LIBCOPP_MACRO_NOEXCEPT | |
stack_allocator_malloc & | operator= (const stack_allocator_malloc &other) LIBCOPP_MACRO_NOEXCEPT |
stack_allocator_malloc (stack_allocator_malloc &&other) LIBCOPP_MACRO_NOEXCEPT | |
stack_allocator_malloc & | operator= (stack_allocator_malloc &&other) LIBCOPP_MACRO_NOEXCEPT |
void | allocate (stack_context &ctx, std::size_t size) LIBCOPP_MACRO_NOEXCEPT |
void | deallocate (stack_context &ctx) LIBCOPP_MACRO_NOEXCEPT |
memory allocator this allocator will maintain buffer using malloc/free function
Definition at line 24 of file stack_allocator_malloc.h.
LIBCOPP_COPP_API allocator::stack_allocator_malloc::stack_allocator_malloc | ( | ) |
Definition at line 33 of file stack_allocator_malloc.cpp.
LIBCOPP_COPP_API allocator::stack_allocator_malloc::~stack_allocator_malloc | ( | ) |
Definition at line 34 of file stack_allocator_malloc.cpp.
LIBCOPP_COPP_API allocator::stack_allocator_malloc::stack_allocator_malloc | ( | const stack_allocator_malloc & | other | ) |
Definition at line 35 of file stack_allocator_malloc.cpp.
LIBCOPP_COPP_API allocator::stack_allocator_malloc::stack_allocator_malloc | ( | stack_allocator_malloc && | other | ) |
Definition at line 42 of file stack_allocator_malloc.cpp.
LIBCOPP_COPP_API void 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 48 of file stack_allocator_malloc.cpp.
References stack_traits::maximum_size(), stack_traits::minimum_size(), stack_traits::round_to_page_size(), and gsl::size().
LIBCOPP_COPP_API void allocator::stack_allocator_malloc::deallocate | ( | stack_context & | ctx | ) |
deallocate memory from stack context [standard function]
ctx | stack context |
Definition at line 69 of file stack_allocator_malloc.cpp.
References stack_traits::is_unbounded(), stack_traits::maximum_size(), and stack_traits::minimum_size().
LIBCOPP_COPP_API stack_allocator_malloc & allocator::stack_allocator_malloc::operator= | ( | const stack_allocator_malloc & | other | ) |
Definition at line 37 of file stack_allocator_malloc.cpp.
LIBCOPP_COPP_API stack_allocator_malloc & allocator::stack_allocator_malloc::operator= | ( | stack_allocator_malloc && | other | ) |
Definition at line 43 of file stack_allocator_malloc.cpp.