libcopp
2.2.0
|
#include <stack_pool.h>
Data Structures | |
struct | configure_t |
struct | constructor_delegator |
struct | limit_t |
Public Types | |
using | allocator_type = TAlloc |
using | ptr_type = std::shared_ptr< stack_pool< TAlloc > > |
using | allocator_t = allocator_type |
using | ptr_t = ptr_type |
Public Member Functions | |
stack_pool (constructor_delegator) | |
~stack_pool () | |
const limit_t & | get_limit () const |
allocator_type & | get_origin_allocator () LIBCOPP_MACRO_NOEXCEPT |
const allocator_type & | get_origin_allocator () const LIBCOPP_MACRO_NOEXCEPT |
size_t | set_stack_size (size_t sz) |
size_t | get_stack_size () const |
size_t | get_stack_size_offset () const |
void | set_max_stack_size (size_t sz) LIBCOPP_MACRO_NOEXCEPT |
size_t | get_max_stack_size () const LIBCOPP_MACRO_NOEXCEPT |
void | set_max_stack_number (size_t sz) LIBCOPP_MACRO_NOEXCEPT |
size_t | get_max_stack_number () const LIBCOPP_MACRO_NOEXCEPT |
void | set_min_stack_size (size_t sz) LIBCOPP_MACRO_NOEXCEPT |
size_t | get_min_stack_size () const LIBCOPP_MACRO_NOEXCEPT |
void | set_min_stack_number (size_t sz) LIBCOPP_MACRO_NOEXCEPT |
size_t | get_min_stack_number () const LIBCOPP_MACRO_NOEXCEPT |
void | set_auto_gc (bool v) LIBCOPP_MACRO_NOEXCEPT |
bool | is_auto_gc () const LIBCOPP_MACRO_NOEXCEPT |
void | set_gc_once_number (size_t v) LIBCOPP_MACRO_NOEXCEPT |
size_t | get_gc_once_number () const LIBCOPP_MACRO_NOEXCEPT |
void | allocate (stack_context &ctx) LIBCOPP_MACRO_NOEXCEPT |
void | deallocate (stack_context &ctx) LIBCOPP_MACRO_NOEXCEPT |
size_t | gc () |
void | clear () |
Static Public Member Functions | |
static ptr_type | create () |
Private Member Functions | |
stack_pool ()=delete | |
stack_pool (const stack_pool &)=delete | |
Private Attributes | |
limit_t | limits_ |
configure_t | conf_ |
allocator_type | alloc_ |
LIBCOPP_COPP_NAMESPACE_ID::util::lock::spin_lock | action_lock_ |
std::list< stack_context > | free_list_ |
Definition at line 27 of file stack_pool.h.
using stack_pool< TAlloc >::allocator_t = allocator_type |
Definition at line 33 of file stack_pool.h.
using stack_pool< TAlloc >::allocator_type = TAlloc |
Definition at line 29 of file stack_pool.h.
using stack_pool< TAlloc >::ptr_t = ptr_type |
Definition at line 34 of file stack_pool.h.
using stack_pool< TAlloc >::ptr_type = std::shared_ptr<stack_pool<TAlloc> > |
Definition at line 30 of file stack_pool.h.
|
privatedelete |
|
privatedelete |
|
inline |
Definition at line 63 of file stack_pool.h.
|
inline |
Definition at line 69 of file stack_pool.h.
|
inline |
allocate memory and attach to stack context [standard function]
ctx | stack context |
size | stack size |
Definition at line 117 of file stack_pool.h.
References COPP_LIKELY_IF.
|
inline |
Definition at line 292 of file stack_pool.h.
References LIBCOPP_UTIL_LOCK_ATOMIC_THREAD_FENCE, and util::lock::memory_order_release.
|
inlinestatic |
Definition at line 61 of file stack_pool.h.
|
inline |
deallocate memory from stack context [standard function]
ctx | stack context |
Definition at line 183 of file stack_pool.h.
References COPP_LIKELY_IF.
|
inline |
Definition at line 226 of file stack_pool.h.
References COPP_LIKELY_IF, LIBCOPP_UTIL_LOCK_ATOMIC_THREAD_FENCE, and util::lock::memory_order_release.
|
inline |
Definition at line 107 of file stack_pool.h.
|
inline |
Definition at line 71 of file stack_pool.h.
|
inline |
Definition at line 96 of file stack_pool.h.
|
inline |
Definition at line 94 of file stack_pool.h.
|
inline |
Definition at line 101 of file stack_pool.h.
|
inline |
Definition at line 99 of file stack_pool.h.
|
inline |
Definition at line 75 of file stack_pool.h.
|
inline |
Definition at line 74 of file stack_pool.h.
|
inline |
Definition at line 90 of file stack_pool.h.
|
inline |
Definition at line 91 of file stack_pool.h.
|
inline |
Definition at line 104 of file stack_pool.h.
|
inline |
Definition at line 103 of file stack_pool.h.
|
inline |
Definition at line 106 of file stack_pool.h.
|
inline |
Definition at line 95 of file stack_pool.h.
|
inline |
Definition at line 93 of file stack_pool.h.
|
inline |
Definition at line 100 of file stack_pool.h.
|
inline |
Definition at line 98 of file stack_pool.h.
|
inline |
Definition at line 77 of file stack_pool.h.
|
private |
Definition at line 313 of file stack_pool.h.
|
private |
Definition at line 311 of file stack_pool.h.
|
private |
Definition at line 310 of file stack_pool.h.
|
private |
Definition at line 315 of file stack_pool.h.
|
private |
Definition at line 309 of file stack_pool.h.