diff --git a/CMakeLists.txt b/CMakeLists.txt index 04856291..a5167d62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -519,6 +519,16 @@ add_mdbx_option(MDBX_TRUST_RTC "Does a system have battery-backed Real-Time Cloc mark_as_advanced(MDBX_TRUST_RTC) option(MDBX_FORCE_ASSERTIONS "Force enable assertion checking" OFF) option(MDBX_DISABLE_VALIDATION "Disable some checks to reduce an overhead and detection probability of database corruption to a values closer to the LMDB" OFF) +option(MDBX_ENABLE_REFUND "Zerocost auto-compactification during write-transactions" ON) +option(MDBX_ENABLE_MADVISE "Using POSIX' madvise() and/or similar hints" ON) +if (CMAKE_TARGET_BITNESS GREATER 32) + set(MDBX_BIGFOOT_DEFAULT ON) +else() + set(MDBX_BIGFOOT_DEFAULT OFF) +endif() +option(MDBX_ENABLE_BIGFOOT "Chunking long list of retired pages during huge transactions commit to avoid use sequences of pages" ${MDBX_BIGFOOT_DEFAULT}) +option(MDBX_ENABLE_PGOP_STAT "Gathering statistics for page operations" ON) +option(MDBX_ENABLE_PROFGC "Profiling of GC search and updates" OFF) if(NOT MDBX_AMALGAMATED_SOURCE) if(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE_UPPERCASE STREQUAL "DEBUG") diff --git a/src/config.h.in b/src/config.h.in index 786a8c0b..05c561b1 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -28,6 +28,11 @@ #endif #cmakedefine01 MDBX_DISABLE_VALIDATION #cmakedefine01 MDBX_AVOID_MSYNC +#cmakedefine01 MDBX_ENABLE_REFUND +#cmakedefine01 MDBX_ENABLE_MADVISE +#cmakedefine01 MDBX_ENABLE_BIGFOOT +#cmakedefine01 MDBX_ENABLE_PGOP_STAT +#cmakedefine01 MDBX_ENABLE_PROFGC /* Windows */ #cmakedefine01 MDBX_WITHOUT_MSVC_CRT diff --git a/src/options.h b/src/options.h index 11df6967..2ab0dce6 100644 --- a/src/options.h +++ b/src/options.h @@ -99,7 +99,7 @@ #error MDBX_ENABLE_BIGFOOT must be defined as 0 or 1 #endif /* MDBX_ENABLE_BIGFOOT */ -/** Controls use of POSIX madvise() hints and friends. */ +/** Controls using of POSIX' madvise() and/or similar hints. */ #ifndef MDBX_ENABLE_MADVISE #define MDBX_ENABLE_MADVISE 1 #elif !(MDBX_ENABLE_MADVISE == 0 || MDBX_ENABLE_MADVISE == 1)