mdbx: provide the gap/reserve for ability of merge sort dirty-page list.

Preparation for fix https://github.com/erthink/libmdbx/issues/132

Change-Id: I4aac6927878eb0361588fbfcf9698ba6d2d5fc34
This commit is contained in:
Leonid Yuriev
2021-01-30 14:46:06 +03:00
parent 9f0ff865e8
commit df180d1d36
3 changed files with 29 additions and 20 deletions

View File

@@ -670,7 +670,7 @@ typedef struct MDBX_dp {
typedef struct MDBX_dpl {
unsigned sorted;
unsigned length;
unsigned allocated;
unsigned detent; /* allocated size excluding the MDBX_DPL_RESERVE_GAP */
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
(!defined(__cplusplus) && defined(_MSC_VER))
MDBX_dp items[] /* dynamic size with holes at zero and after the last */;