zpp
Zephyr C++20 Framework
|
A mem_slab class referencing another mem slab object. More...
#include <mem_slab.hpp>
Public Member Functions | |
constexpr | mem_slab_ref (native_pointer m) noexcept |
Construct a reference to a native k_mem_slab*. More... | |
template<class T_MemSlab > | |
constexpr | mem_slab_ref (T_MemSlab &m) noexcept |
Construct a reference to another mem_slab object. More... | |
constexpr mem_slab_ref & | operator= (native_pointer m) noexcept |
Assign a new native k_mem_slab* object. More... | |
template<class T_MemSlab > | |
constexpr mem_slab_ref & | operator= (T_MemSlab &m) noexcept |
Assign a new native mem slab object. More... | |
constexpr auto | native_handle () noexcept -> native_pointer |
get the native zephyr mem slab handle. More... | |
constexpr auto | native_handle () const noexcept -> native_const_pointer |
get the native zephyr mem slab handle. More... | |
mem_slab_ref ()=delete | |
Public Member Functions inherited from zpp::mem_slab_base< mem_slab_ref > | |
mem_slab_base (const mem_slab_base &)=delete | |
mem_slab_base (mem_slab_base &&)=delete | |
void * | allocate () noexcept |
allocate a memory block, waiting forever More... | |
void * | try_allocate () noexcept |
try allocate a memory block, not waiting More... | |
void * | try_allocate_for (const std::chrono::duration< T_Rep, T_Period > &timeout) noexcept |
try allocate a memory block waiting with a timeout More... | |
void | deallocate (void *vp) noexcept |
deallocate memory More... | |
constexpr auto | block_size () const noexcept |
the size of the memory blocks More... | |
constexpr auto | total_block_count () const noexcept |
get maximm number of blocks that can be allocated More... | |
constexpr auto | used_block_count () noexcept |
get current number of used blocks More... | |
constexpr auto | free_block_count () noexcept |
get current number of free blocks More... | |
auto | native_handle () noexcept -> native_pointer |
get the native zephyr mem slab handle. More... | |
auto | native_handle () const noexcept -> native_const_pointer |
get the native zephyr mem slab handle. More... | |
mem_slab_base & | operator= (const mem_slab_base &)=delete |
mem_slab_base & | operator= (mem_slab_base &&)=delete |
Additional Inherited Members | |
Public Types inherited from zpp::mem_slab_base< mem_slab_ref > | |
using | native_type = struct k_mem_slab |
using | native_pointer = native_type * |
using | native_const_pointer = native_type const * |
Protected Member Functions inherited from zpp::mem_slab_base< mem_slab_ref > | |
constexpr | mem_slab_base () noexcept |
A mem_slab class referencing another mem slab object.
Definition at line 234 of file mem_slab.hpp.
|
inlineexplicitconstexprnoexcept |
Construct a reference to a native k_mem_slab*.
m | The k_mem_slab to reference. m must already be initialized and will not be freed. |
Definition at line 242 of file mem_slab.hpp.
|
inlineexplicitconstexprnoexcept |
Construct a reference to another mem_slab object.
m | The object to reference. m must already be initialized and will not be freed. |
Definition at line 255 of file mem_slab.hpp.
|
delete |
|
inlineconstexprnoexcept |
get the native zephyr mem slab handle.
Definition at line 307 of file mem_slab.hpp.
|
inlineconstexprnoexcept |
get the native zephyr mem slab handle.
Definition at line 297 of file mem_slab.hpp.
Referenced by operator=().
|
inlineconstexprnoexcept |
Assign a new native k_mem_slab* object.
m | The k_mem_slab to reference. m must already be initialized and will not be freed. |
Definition at line 269 of file mem_slab.hpp.
|
inlineconstexprnoexcept |
Assign a new native mem slab object.
m | The object to reference. m must already be initialized and will not be freed. |
Definition at line 285 of file mem_slab.hpp.
References native_handle().