ITS#9027 LMDB: expose address of memory map

Returned in MDB_envinfo.
This commit is contained in:
Howard Chu 2026-04-22 19:22:56 +01:00
parent a0cb775d89
commit 63698faf2c
2 changed files with 2 additions and 2 deletions

View file

@ -547,7 +547,7 @@ typedef struct MDB_stat {
/** @brief Information about the environment */
typedef struct MDB_envinfo {
void *me_mapaddr; /**< Address of map, if fixed */
void *me_mapaddr; /**< Address of map */
mdb_size_t me_mapsize; /**< Size of the data memory map */
mdb_size_t me_last_pgno; /**< ID of the last used page */
mdb_size_t me_last_txnid; /**< ID of the last committed transaction */

View file

@ -11920,7 +11920,7 @@ mdb_env_info(MDB_env *env, MDB_envinfo *arg)
return EINVAL;
meta = mdb_env_pick_meta(env);
arg->me_mapaddr = meta->mm_address;
arg->me_mapaddr = meta->mm_address ? meta->mm_address : env->me_map;
arg->me_last_pgno = meta->mm_last_pg;
arg->me_last_txnid = meta->mm_txnid;