libmdbx  0.11.6.39 (2022-04-13T11:05:50+03:00)
One of the fastest compact embeddable key-value ACID database without WAL.
mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin Union Reference

#include <mdbx.h++>

Classes

struct  allocated
 

Public Types

enum  : byte { le_lastbyte_mask = 0x80, be_lastbyte_mask = 0x01 }
 

Public Member Functions

constexpr byte lastbyte () const noexcept
 
MDBX_CXX17_CONSTEXPR bytelastbyte () noexcept
 
constexpr bool is_inplace () const noexcept
 
constexpr bool is_allocated () const noexcept
 
template<bool destroy_ptr>
MDBX_CXX17_CONSTEXPR bytemake_inplace () noexcept
 
template<bool construct_ptr>
MDBX_CXX17_CONSTEXPR bytemake_allocated (allocator_pointer ptr, size_t capacity_bytes) noexcept
 
MDBX_CXX20_CONSTEXPR bin (size_t capacity_bytes=0) noexcept
 
MDBX_CXX20_CONSTEXPR bin (allocator_pointer ptr, size_t capacity_bytes) noexcept
 
MDBX_CXX20_CONSTEXPR ~bin ()
 
MDBX_CXX20_CONSTEXPR bin (bin &&ditto) noexcept
 
MDBX_CXX17_CONSTEXPR binoperator= (const bin &ditto) noexcept
 
MDBX_CXX17_CONSTEXPR binoperator= (bin &&ditto) noexcept
 
constexpr const byteaddress () const noexcept
 
MDBX_CXX17_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 byte inplace_lastbyte_mask () noexcept
 
static MDBX_CXX20_CONSTEXPR size_t advise_capacity (const size_t current, const size_t wanna)
 

Public Attributes

allocated allocated_
 
uint64_t align_hint_
 
byte inplace_ [(sizeof(allocated)+extra_inplace_storage+7u) &~size_t(7)]
 

Member Enumeration Documentation

◆ anonymous enum

template<class ALLOCATOR , typename CAPACITY_POLICY >
anonymous enum : byte
Enumerator
le_lastbyte_mask 
be_lastbyte_mask 

Constructor & Destructor Documentation

◆ bin() [1/3]

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

◆ bin() [2/3]

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

◆ ~bin()

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

◆ bin() [3/3]

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

Member Function Documentation

◆ address() [1/2]

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

◆ address() [2/2]

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

◆ advise_capacity()

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

◆ capacity()

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

◆ inplace_lastbyte_mask()

template<class ALLOCATOR , typename CAPACITY_POLICY >
static constexpr byte mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::inplace_lastbyte_mask ( )
inlinestaticconstexprnoexcept

◆ is_allocated()

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

◆ is_inplace()

template<class ALLOCATOR , typename CAPACITY_POLICY >
constexpr 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

◆ lastbyte() [1/2]

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

◆ lastbyte() [2/2]

template<class ALLOCATOR , typename CAPACITY_POLICY >
MDBX_CXX17_CONSTEXPR byte& mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::lastbyte ( )
inlinenoexcept

◆ make_allocated()

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

◆ make_inplace()

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

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Member Data Documentation

◆ align_hint_

template<class ALLOCATOR , typename CAPACITY_POLICY >
uint64_t mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::align_hint_

◆ allocated_

template<class ALLOCATOR , typename CAPACITY_POLICY >
allocated mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::allocated_

◆ inplace_

template<class ALLOCATOR , typename CAPACITY_POLICY >
byte mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::inplace_[(sizeof(allocated)+extra_inplace_storage+7u) & ~size_t(7)]

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