Skip to content

ThreadLocalBuffer

#include <sbio/storage/thread_local_buffer.hh>
struct ThreadLocalBuffer

Defined in src/lib/sbio/storage/thread_local_buffer.hh:28

Name Kind Owner
ptr function Declared here
size function Declared here
set_memory function Declared here
memory_space function Declared here
m_size variable Declared here
Return Name Description
void * ptr const inline
std::size_t size const inline
void set_memory inline The ThreadLocalBuffer sets memory in a delayed fashion, only storing size here.

const inline

inline void * ptr() const

Defined in src/lib/sbio/storage/thread_local_buffer.hh:40


const inline

inline std::size_t size() const

Defined in src/lib/sbio/storage/thread_local_buffer.hh:82


inline

inline void set_memory(void * ptr, std::size_t size)

Defined in src/lib/sbio/storage/thread_local_buffer.hh:95

The ThreadLocalBuffer sets memory in a delayed fashion, only storing size here.

The actual memory allocation occurs on the first retrieval of the underlying buffer pointer. This allows each thread to maintain its own buffer.

Parameter Type Description
ptr void * Location to allocate memory over. Ignored.
size std::size_t The size of the buffer required.
Return Name Description
constexpr MemorySpace memory_space static inline constexpr

static inline constexpr

constexpr static inline constexpr MemorySpace memory_space()

Defined in src/lib/sbio/storage/thread_local_buffer.hh:30

Return Name Description
std::size_t m_size

std::size_t m_size { 0 }

Defined in src/lib/sbio/storage/thread_local_buffer.hh:102