libmdbx 0.13.4.211 (2025-03-21T00:31:54+03:00)
One of the fastest compact embeddable key-value ACID storage engine without WAL.
 
Loading...
Searching...
No Matches
mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin Union Reference

#include <mdbx.h++>

Classes

struct  capacity_holder
 
struct  inplace_flag_holder
 
struct  stub_allocated_holder
 

Public Types

enum  : byte { lastbyte_poison = 0 , lastbyte_inplace_signature = byte(~byte(lastbyte_poison)) }
 
enum  : size_t { inplace_signature_limit , inplace_size_rounding = size_t(inplace_storage_size_rounding) - 1 , inplace_size }
 

Public Member Functions

constexpr bool is_inplace () const noexcept
 
constexpr bool is_allocated () const noexcept
 
template<bool destroy_ptr>
constexpr bytemake_inplace () noexcept
 
template<bool construct_ptr>
constexpr bytemake_allocated (allocator_pointer ptr, size_t capacity_bytes) noexcept
 
constexpr bin (size_t capacity_bytes=0) noexcept
 
constexpr bin (allocator_pointer ptr, size_t capacity_bytes) noexcept
 
constexpr ~bin ()
 
constexpr bin (bin &&ditto) noexcept
 
constexpr binoperator= (const bin &ditto) noexcept
 
constexpr binoperator= (bin &&ditto) noexcept
 
constexpr const byteaddress () const noexcept
 
constexpr byteaddress () noexcept
 
constexpr size_t capacity () const noexcept
 

Static Public Member Functions

static constexpr bool is_suitable_for_inplace (size_t capacity_bytes) noexcept
 
static constexpr size_t advise_capacity (const size_t current, const size_t wanna)
 

Public Attributes

allocator_pointer allocated_ptr_
 
capacity_holder capacity_
 
inplace_flag_holder inplace_
 

Class Documentation

◆ mdbx::buffer::silo::bin::capacity_holder

struct mdbx::buffer::silo::bin::capacity_holder
template<class ALLOCATOR, typename CAPACITY_POLICY>
struct mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::capacity_holder
Class Members
size_t bytes_
byte pad_[inplace_size - sizeof(allocator_pointer)]

◆ mdbx::buffer::silo::bin::inplace_flag_holder

struct mdbx::buffer::silo::bin::inplace_flag_holder
template<class ALLOCATOR, typename CAPACITY_POLICY>
struct mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::inplace_flag_holder
Class Members
byte buffer_[inplace_size - sizeof(byte)]
byte lastbyte_

◆ mdbx::buffer::silo::bin::stub_allocated_holder

struct mdbx::buffer::silo::bin::stub_allocated_holder
template<class ALLOCATOR, typename CAPACITY_POLICY>
struct mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::stub_allocated_holder
Class Members
allocator_pointer ptr_
size_t stub_capacity_bytes_

Member Enumeration Documentation

◆ anonymous enum

template<class ALLOCATOR, typename CAPACITY_POLICY>
anonymous enum : size_t
Enumerator
inplace_signature_limit 
inplace_size_rounding 
inplace_size 

◆ anonymous enum

template<class ALLOCATOR, typename CAPACITY_POLICY>
anonymous enum : byte
Enumerator
lastbyte_poison 
lastbyte_inplace_signature 

Constructor & Destructor Documentation

◆ bin() [1/3]

template<class ALLOCATOR, typename CAPACITY_POLICY>
mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::bin ( size_t capacity_bytes = 0)
inlineconstexprnoexcept

◆ bin() [2/3]

template<class ALLOCATOR, typename CAPACITY_POLICY>
mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::bin ( allocator_pointer ptr,
size_t capacity_bytes )
inlineconstexprnoexcept

◆ ~bin()

template<class ALLOCATOR, typename CAPACITY_POLICY>
mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::~bin ( )
inlineconstexpr

◆ bin() [3/3]

template<class ALLOCATOR, typename CAPACITY_POLICY>
mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::bin ( bin && ditto)
inlineconstexprnoexcept

Member Function Documentation

◆ address() [1/2]

template<class ALLOCATOR, typename CAPACITY_POLICY>
const byte * mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::address ( ) const
inlineconstexprnoexcept

◆ address() [2/2]

template<class ALLOCATOR, typename CAPACITY_POLICY>
byte * mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::address ( )
inlineconstexprnoexcept

◆ advise_capacity()

template<class ALLOCATOR, typename CAPACITY_POLICY>
static constexpr size_t mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::advise_capacity ( const size_t current,
const size_t wanna )
inlinestaticconstexpr

◆ capacity()

template<class ALLOCATOR, typename CAPACITY_POLICY>
size_t mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::capacity ( ) const
inlineconstexprnoexcept

◆ is_allocated()

template<class ALLOCATOR, typename CAPACITY_POLICY>
bool mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::is_allocated ( ) const
inlineconstexprnoexcept

◆ is_inplace()

template<class ALLOCATOR, typename CAPACITY_POLICY>
bool mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::is_inplace ( ) const
inlineconstexprnoexcept

◆ is_suitable_for_inplace()

template<class ALLOCATOR, typename CAPACITY_POLICY>
static constexpr bool mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::is_suitable_for_inplace ( size_t capacity_bytes)
inlinestaticconstexprnoexcept

◆ make_allocated()

template<class ALLOCATOR, typename CAPACITY_POLICY>
template<bool construct_ptr>
byte * mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::make_allocated ( allocator_pointer ptr,
size_t capacity_bytes )
inlineconstexprnoexcept

◆ make_inplace()

template<class ALLOCATOR, typename CAPACITY_POLICY>
template<bool destroy_ptr>
byte * mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::make_inplace ( )
inlineconstexprnoexcept

◆ operator=() [1/2]

template<class ALLOCATOR, typename CAPACITY_POLICY>
bin & mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::operator= ( bin && ditto)
inlineconstexprnoexcept

◆ operator=() [2/2]

template<class ALLOCATOR, typename CAPACITY_POLICY>
bin & mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::operator= ( const bin & ditto)
inlineconstexprnoexcept

Member Data Documentation

◆ allocated_ptr_

template<class ALLOCATOR, typename CAPACITY_POLICY>
allocator_pointer mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::allocated_ptr_

◆ capacity_

template<class ALLOCATOR, typename CAPACITY_POLICY>
capacity_holder mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::capacity_

◆ inplace_

template<class ALLOCATOR, typename CAPACITY_POLICY>
inplace_flag_holder mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::inplace_

The documentation for this union was generated from the following file: