mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:54:14 +08:00
mdbx: allow 256-byte pages.
Change-Id: I697de67683fb040ea0e360515a5a0839d97e9aa6
This commit is contained in:
parent
8291de71cb
commit
440bfec193
@ -3275,7 +3275,7 @@ done:
|
||||
__hot static void mdbx_page_copy(MDBX_page *dst, MDBX_page *src,
|
||||
unsigned psize) {
|
||||
STATIC_ASSERT(UINT16_MAX > MAX_PAGESIZE - PAGEHDRSZ);
|
||||
STATIC_ASSERT(MIN_PAGESIZE > PAGEHDRSZ + NODESIZE * 42);
|
||||
STATIC_ASSERT(MIN_PAGESIZE > PAGEHDRSZ + NODESIZE * 4);
|
||||
if (!IS_LEAF2(src)) {
|
||||
size_t upper = src->mp_upper, lower = src->mp_lower, unused = upper - lower;
|
||||
|
||||
@ -6298,7 +6298,7 @@ static void __cold mdbx_setup_pagesize(MDBX_env *env, const size_t pagesize) {
|
||||
mdbx_ensure(env, pagesize <= MAX_PAGESIZE);
|
||||
env->me_psize = (unsigned)pagesize;
|
||||
|
||||
STATIC_ASSERT(mdbx_maxgc_ov1page(MIN_PAGESIZE) > 42);
|
||||
STATIC_ASSERT(mdbx_maxgc_ov1page(MIN_PAGESIZE) > 4);
|
||||
STATIC_ASSERT(mdbx_maxgc_ov1page(MAX_PAGESIZE) < MDBX_DPL_TXNFULL);
|
||||
const intptr_t maxgc_ov1page = (pagesize - PAGEHDRSZ) / sizeof(pgno_t) - 1;
|
||||
mdbx_ensure(env,
|
||||
|
@ -612,7 +612,7 @@ typedef struct MDBX_lockinfo {
|
||||
* pressure from other processes is high. So until OSs have
|
||||
* actual paging support for Huge pages, they're not viable. */
|
||||
#define MAX_PAGESIZE 0x10000u
|
||||
#define MIN_PAGESIZE 512u
|
||||
#define MIN_PAGESIZE 256u
|
||||
|
||||
#define MIN_MAPSIZE (MIN_PAGESIZE * MIN_PAGENO)
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
|
Loading…
x
Reference in New Issue
Block a user