|
Network System 0.1.1
High-performance modular networking library for scalable client-server applications
|

Public Member Functions | |
| impl (size_t pool_size, size_t default_capacity) | |
| auto | acquire (size_t min_capacity, buffer_pool *parent) -> std::shared_ptr< std::vector< uint8_t > > |
| auto | release (std::vector< uint8_t > *buffer) -> void |
| auto | get_stats () const -> std::pair< size_t, size_t > |
| auto | clear () -> void |
Private Attributes | |
| size_t | pool_size_ |
| size_t | default_capacity_ |
| std::atomic< size_t > | total_allocated_ |
| std::mutex | mutex_ |
| std::deque< std::unique_ptr< std::vector< uint8_t > > > | available_buffers_ |
Definition at line 15 of file buffer_pool.cpp.
|
inlineexplicit |
Definition at line 18 of file buffer_pool.cpp.
References NETWORK_LOG_DEBUG.
|
inline |
Definition at line 26 of file buffer_pool.cpp.
References available_buffers_, default_capacity_, mutex_, NETWORK_LOG_TRACE, and total_allocated_.
|
inline |
Definition at line 113 of file buffer_pool.cpp.
References available_buffers_, mutex_, NETWORK_LOG_INFO, and total_allocated_.
Referenced by kcenon::network::utils::buffer_pool::~buffer_pool().

|
inline |
Definition at line 107 of file buffer_pool.cpp.
References available_buffers_, mutex_, and total_allocated_.
Referenced by kcenon::network::utils::buffer_pool::get_stats().

|
inline |
Definition at line 84 of file buffer_pool.cpp.
References available_buffers_, mutex_, NETWORK_LOG_TRACE, pool_size_, and total_allocated_.
|
private |
Definition at line 131 of file buffer_pool.cpp.
Referenced by acquire(), clear(), get_stats(), and release().
|
private |
Definition at line 127 of file buffer_pool.cpp.
Referenced by acquire().
|
mutableprivate |
Definition at line 130 of file buffer_pool.cpp.
Referenced by acquire(), clear(), get_stats(), and release().
|
private |
Definition at line 126 of file buffer_pool.cpp.
Referenced by release().
|
private |
Definition at line 128 of file buffer_pool.cpp.
Referenced by acquire(), clear(), get_stats(), and release().