| 
    libcopp 2.3.1
    
   | 
 
memory allocator this allocator will return address of specified memory section More...
#include <stack_allocator_memory.h>

Public Member Functions | |
| stack_allocator_memory () LIBCOPP_MACRO_NOEXCEPT | |
| stack_allocator_memory (void *start_ptr, std::size_t max_size) LIBCOPP_MACRO_NOEXCEPT | |
| stack_allocator_memory (stack_allocator_memory &other) LIBCOPP_MACRO_NOEXCEPT | |
| stack_allocator_memory (stack_allocator_memory &&other) LIBCOPP_MACRO_NOEXCEPT | |
| ~stack_allocator_memory () | |
| stack_allocator_memory & | operator= (stack_allocator_memory &other) LIBCOPP_MACRO_NOEXCEPT | 
| stack_allocator_memory & | operator= (stack_allocator_memory &&other) LIBCOPP_MACRO_NOEXCEPT | 
| void | swap (stack_allocator_memory &other) | 
| void | attach (void *start_ptr, std::size_t max_size) LIBCOPP_MACRO_NOEXCEPT | 
| void | allocate (stack_context &ctx, std::size_t size) LIBCOPP_MACRO_NOEXCEPT | 
| void | deallocate (stack_context &ctx) LIBCOPP_MACRO_NOEXCEPT | 
Private Attributes | |
| void * | start_ptr_ | 
| std::size_t | memory_size_ | 
| bool | is_used_ | 
memory allocator this allocator will return address of specified memory section
Definition at line 24 of file stack_allocator_memory.h.
| LIBCOPP_COPP_API allocator::stack_allocator_memory::stack_allocator_memory | ( | ) | 
Definition at line 34 of file stack_allocator_memory.cpp.
| LIBCOPP_COPP_API allocator::stack_allocator_memory::stack_allocator_memory | ( | void * | start_ptr, | 
| std::size_t | max_size | ||
| ) | 
construct and attach to start_ptr with size of max_size
| start_ptr | buffer start address | 
| max_size | buffer size | 
Definition at line 38 of file stack_allocator_memory.cpp.
| LIBCOPP_COPP_API allocator::stack_allocator_memory::stack_allocator_memory | ( | stack_allocator_memory & | other | ) | 
Definition at line 44 of file stack_allocator_memory.cpp.
| LIBCOPP_COPP_API allocator::stack_allocator_memory::stack_allocator_memory | ( | stack_allocator_memory && | other | ) | 
Definition at line 53 of file stack_allocator_memory.cpp.
| LIBCOPP_COPP_API allocator::stack_allocator_memory::~stack_allocator_memory | ( | ) | 
Definition at line 62 of file stack_allocator_memory.cpp.
| LIBCOPP_COPP_API void allocator::stack_allocator_memory::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 93 of file stack_allocator_memory.cpp.
References stack_traits::maximum_size(), stack_traits::minimum_size(), and stack_traits::round_to_page_size().
| LIBCOPP_COPP_API void allocator::stack_allocator_memory::attach | ( | void * | start_ptr, | 
| std::size_t | max_size | ||
| ) | 
specify memory section allocated
| start_ptr | buffer start address | 
| max_size | buffer size | 
Definition at line 87 of file stack_allocator_memory.cpp.
| LIBCOPP_COPP_API void allocator::stack_allocator_memory::deallocate | ( | stack_context & | ctx | ) | 
deallocate memory from stack context [standard function]
| ctx | stack context | 
Definition at line 115 of file stack_allocator_memory.cpp.
References stack_traits::is_unbounded(), stack_traits::maximum_size(), and stack_traits::minimum_size().
| LIBCOPP_COPP_API stack_allocator_memory & allocator::stack_allocator_memory::operator= | ( | stack_allocator_memory && | other | ) | 
Definition at line 72 of file stack_allocator_memory.cpp.
| LIBCOPP_COPP_API stack_allocator_memory & allocator::stack_allocator_memory::operator= | ( | stack_allocator_memory & | other | ) | 
Definition at line 64 of file stack_allocator_memory.cpp.
| LIBCOPP_COPP_API void allocator::stack_allocator_memory::swap | ( | stack_allocator_memory & | other | ) | 
Definition at line 80 of file stack_allocator_memory.cpp.
References is_used_, memory_size_, start_ptr_, std::swap(), and swap().
Referenced by swap().
      
  | 
  private | 
Definition at line 28 of file stack_allocator_memory.h.
Referenced by swap().
      
  | 
  private | 
Definition at line 27 of file stack_allocator_memory.h.
Referenced by swap().
      
  | 
  private | 
Definition at line 26 of file stack_allocator_memory.h.
Referenced by swap().