mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-08 06:54:12 +08:00
mdbx: common database format for 32/64 targets (remove 'size_t' structures).
Change-Id: I2d7c77603ee27c5ae4b82f762a726f71136527c8
This commit is contained in:
parent
fca74ab80c
commit
a0ddf167dd
13
src/bits.h
13
src/bits.h
@ -235,11 +235,11 @@ typedef struct MDBX_db {
|
|||||||
uint32_t md_xsize; /* also ksize for LEAF2 pages */
|
uint32_t md_xsize; /* also ksize for LEAF2 pages */
|
||||||
uint16_t md_flags; /* see mdbx_dbi_open */
|
uint16_t md_flags; /* see mdbx_dbi_open */
|
||||||
uint16_t md_depth; /* depth of this tree */
|
uint16_t md_depth; /* depth of this tree */
|
||||||
|
uint64_t md_root; /* the root page of this tree */
|
||||||
uint64_t md_seq; /* table sequence counter */
|
uint64_t md_seq; /* table sequence counter */
|
||||||
pgno_t md_branch_pages; /* number of internal pages */
|
uint64_t md_branch_pages; /* number of internal pages */
|
||||||
pgno_t md_leaf_pages; /* number of leaf pages */
|
uint64_t md_leaf_pages; /* number of leaf pages */
|
||||||
pgno_t md_overflow_pages; /* number of overflow pages */
|
uint64_t md_overflow_pages; /* number of overflow pages */
|
||||||
pgno_t md_root; /* the root page of this tree */
|
|
||||||
uint64_t md_entries; /* number of data items */
|
uint64_t md_entries; /* number of data items */
|
||||||
} MDBX_db;
|
} MDBX_db;
|
||||||
|
|
||||||
@ -255,7 +255,7 @@ typedef struct MDBX_meta {
|
|||||||
/* txnid that committed this page, */
|
/* txnid that committed this page, */
|
||||||
volatile txnid_t mm_txnid_top;
|
volatile txnid_t mm_txnid_top;
|
||||||
|
|
||||||
size_t mm_mapsize; /* size of mmap region */
|
uint64_t mm_mapsize; /* size of mmap region */
|
||||||
MDBX_db mm_dbs[CORE_DBS]; /* first is free space, 2nd is main db */
|
MDBX_db mm_dbs[CORE_DBS]; /* first is free space, 2nd is main db */
|
||||||
/* The size of pages used in this DB */
|
/* The size of pages used in this DB */
|
||||||
#define mm_psize mm_dbs[FREE_DBI].md_xsize
|
#define mm_psize mm_dbs[FREE_DBI].md_xsize
|
||||||
@ -264,7 +264,8 @@ typedef struct MDBX_meta {
|
|||||||
mdbx_canary mm_canary;
|
mdbx_canary mm_canary;
|
||||||
/* Last used page in the datafile.
|
/* Last used page in the datafile.
|
||||||
* Actually the file may be shorter if the freeDB lists the final pages. */
|
* Actually the file may be shorter if the freeDB lists the final pages. */
|
||||||
pgno_t mm_last_pg;
|
uint64_t mm_last_pg;
|
||||||
|
volatile txnid_t mm_txnid; /* txnid that committed this page */
|
||||||
#define MDBX_DATASIGN_NONE 0u
|
#define MDBX_DATASIGN_NONE 0u
|
||||||
#define MDBX_DATASIGN_WEAK 1u
|
#define MDBX_DATASIGN_WEAK 1u
|
||||||
volatile uint64_t mm_datasync_sign;
|
volatile uint64_t mm_datasync_sign;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user