mirror of
https://github.com/isar/libmdbx.git
synced 2025-03-04 05:08:14 +08:00
mdbx++: add FIXME for buffer::silo
.
Change-Id: I0a4a7bb947d019578153b7d09274b3ad0d1496aa
This commit is contained in:
parent
b68e7c8186
commit
4703dac49d
7
mdbx.h++
7
mdbx.h++
@ -803,6 +803,13 @@ protected:
|
|||||||
/// \brief The chunk of data stored inside the buffer or located outside it.
|
/// \brief The chunk of data stored inside the buffer or located outside it.
|
||||||
template <class ALLOCATOR = legacy_allocator> class buffer {
|
template <class ALLOCATOR = legacy_allocator> class buffer {
|
||||||
friend class txn;
|
friend class txn;
|
||||||
|
/* FIXME: replace std::string with custom silo.
|
||||||
|
* The std::string<char> does not guarantee any alignment for allocated
|
||||||
|
* buffer. For instance short values may be stored within internal inplace
|
||||||
|
* buffer, which might odd address. Moreover, allocator for the `char` type
|
||||||
|
* may return unaligned/odd address. This may UB for placing a 32-bit and
|
||||||
|
* 64-bit values.
|
||||||
|
* So seems the std::string<> should be replaced with ad hoc solution. */
|
||||||
using silo = ::mdbx::string<ALLOCATOR>;
|
using silo = ::mdbx::string<ALLOCATOR>;
|
||||||
silo silo_;
|
silo silo_;
|
||||||
::mdbx::slice slice_;
|
::mdbx::slice slice_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user