mdbx: рефакторинг env_handle_pathname() для одной точки выделения/освобождения памяти.

This commit is contained in:
Леонид Юрьев (Leonid Yuriev)
2023-11-11 20:16:06 +03:00
parent 1b2f5f25d4
commit 97418d5c9c
2 changed files with 101 additions and 112 deletions

View File

@@ -1400,10 +1400,12 @@ struct MDBX_env {
MDBX_dbi me_maxdbs; /* size of the DB table */
uint32_t me_pid; /* process ID of this env */
osal_thread_key_t me_txkey; /* thread-key for readers */
pathchar_t *me_pathname; /* path to the DB files */
void *me_pbuf; /* scratch area for DUPSORT put() */
MDBX_txn *me_txn0; /* preallocated write transaction */
struct { /* path to the DB files */
pathchar_t *lck, *dxb, *specified;
void *buffer;
} me_pathname;
void *me_pbuf; /* scratch area for DUPSORT put() */
MDBX_txn *me_txn0; /* preallocated write transaction */
MDBX_dbx *me_dbxs; /* array of static DB info */
uint16_t *__restrict me_db_flags; /* array of flags from MDBX_db.md_flags */
MDBX_atomic_uint32_t *me_dbi_seqs; /* array of dbi sequence numbers */