mirror of
https://gitflic.ru/project/erthink/libmdbx.git
synced 2025-01-09 17:56:51 +00:00
mdbx: исправление несогласованности MDBX_DPL_PREALLOC_FOR_RADIXSORT
и assert-проверки внутри dpl_bytes2size()
.
This commit is contained in:
parent
b9e4c1ea73
commit
a76e06a48e
@ -20,10 +20,10 @@ static inline size_t dpl_size2bytes(ptrdiff_t size) {
|
|||||||
|
|
||||||
static inline size_t dpl_bytes2size(const ptrdiff_t bytes) {
|
static inline size_t dpl_bytes2size(const ptrdiff_t bytes) {
|
||||||
size_t size = (bytes - sizeof(dpl_t)) / sizeof(dp_t);
|
size_t size = (bytes - sizeof(dpl_t)) / sizeof(dp_t);
|
||||||
assert(size > CURSOR_STACK_SIZE && size <= PAGELIST_LIMIT + MDBX_PNL_GRANULATE);
|
|
||||||
#if MDBX_DPL_PREALLOC_FOR_RADIXSORT
|
#if MDBX_DPL_PREALLOC_FOR_RADIXSORT
|
||||||
size >>= 1;
|
size >>= 1;
|
||||||
#endif /* MDBX_DPL_PREALLOC_FOR_RADIXSORT */
|
#endif /* MDBX_DPL_PREALLOC_FOR_RADIXSORT */
|
||||||
|
assert(size > CURSOR_STACK_SIZE && size <= PAGELIST_LIMIT + MDBX_PNL_GRANULATE);
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user