mdbx: use 2^N constants for fill-threshold.

Change-Id: I3e190f5af77282a7995ae733c7a6865a21daa6c3
This commit is contained in:
Leo Yuriev 2017-06-05 16:56:10 +03:00
parent 59c22ab036
commit 439ae3983c

View File

@ -902,11 +902,11 @@ static __inline size_t roundup2(size_t value, size_t granularity) {
/* The percentage of space used in the page, in tenths of a percent. */
#define PAGEFILL(env, p) \
(1000L * ((env)->me_psize - PAGEHDRSZ - SIZELEFT(p)) / \
(1024L * ((env)->me_psize - PAGEHDRSZ - SIZELEFT(p)) / \
((env)->me_psize - PAGEHDRSZ))
/* The minimum page fill factor, in tenths of a percent.
* Pages emptier than this are candidates for merging. */
#define FILL_THRESHOLD 250
#define FILL_THRESHOLD 256
/* Test if a page is a leaf page */
#define IS_LEAF(p) F_ISSET((p)->mp_flags, P_LEAF)