libmdbx  0.13.0.37 (2024-04-04T17:32:49+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
 
constexpr bytelastbyte () noexcept
 
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 byte inplace_lastbyte_mask () noexcept
 
static 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 >
constexpr mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::bin ( size_t  capacity_bytes = 0)
inlineconstexprnoexcept

◆ bin() [2/3]

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

◆ ~bin()

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

◆ bin() [3/3]

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

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 >
constexpr 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 >
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 >
constexpr byte& mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::lastbyte ( )
inlineconstexprnoexcept

◆ make_allocated()

template<class ALLOCATOR , typename CAPACITY_POLICY >
template<bool construct_ptr>
constexpr 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>
constexpr byte* mdbx::buffer< ALLOCATOR, CAPACITY_POLICY >::silo::bin::make_inplace ( )
inlineconstexprnoexcept

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

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: