diff --git a/builds/cmake/CMakePresets.json b/builds/cmake/CMakePresets.json
index ef8c3c193..e82d722ef 100644
--- a/builds/cmake/CMakePresets.json
+++ b/builds/cmake/CMakePresets.json
@@ -36,8 +36,8 @@
"hidden": true,
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
- "CMAKE_C_FLAGS": "$env{CMAKE_C_FLAGS} -Og -g --coverage -fprofile-update=atomic",
- "CMAKE_CXX_FLAGS": "$env{CMAKE_CXX_FLAGS} -Og -g --coverage -fprofile-update=atomic"
+ "CMAKE_C_FLAGS": "$env{CMAKE_C_FLAGS} -Og -g1 --coverage -fprofile-update=atomic",
+ "CMAKE_CXX_FLAGS": "$env{CMAKE_CXX_FLAGS} -Og -g1 --coverage -fprofile-update=atomic"
}
},
{
diff --git a/builds/cmake/install-cmake.sh b/builds/cmake/install-cmake.sh
index 5a3c171a5..60d46fe14 100755
--- a/builds/cmake/install-cmake.sh
+++ b/builds/cmake/install-cmake.sh
@@ -343,7 +343,7 @@ main()
msg_verbose "*** Build config specified, calculating flags..."
if [[ "${BUILD_CONFIG}" == "debug" ]]; then
- BUILD_FLAGS="-Og -g"
+ BUILD_FLAGS="-Og -g1"
elif [[ "${BUILD_CONFIG}" == "release" ]]; then
BUILD_FLAGS="-O3"
fi
diff --git a/builds/cmake/install-presets.sh b/builds/cmake/install-presets.sh
index 3d5db2d08..3acc41f76 100755
--- a/builds/cmake/install-presets.sh
+++ b/builds/cmake/install-presets.sh
@@ -359,7 +359,7 @@ main()
msg_verbose "*** Build config specified, calculating flags..."
if [[ "${BUILD_CONFIG}" == "debug" ]]; then
- BUILD_FLAGS="-Og -g"
+ BUILD_FLAGS="-Og -g1"
elif [[ "${BUILD_CONFIG}" == "release" ]]; then
BUILD_FLAGS="-O3"
fi
diff --git a/builds/gnu/install-gnu.sh b/builds/gnu/install-gnu.sh
index 489d4c677..43b29dd99 100755
--- a/builds/gnu/install-gnu.sh
+++ b/builds/gnu/install-gnu.sh
@@ -345,7 +345,7 @@ main()
msg_verbose "*** Build config specified, calculating flags..."
if [[ "${BUILD_CONFIG}" == "debug" ]]; then
- BUILD_FLAGS="-Og -g"
+ BUILD_FLAGS="-Og -g1"
elif [[ "${BUILD_CONFIG}" == "release" ]]; then
BUILD_FLAGS="-O3"
fi
diff --git a/builds/msvc/properties/Debug.props b/builds/msvc/properties/Debug.props
index d643eaa9d..1a54192f3 100644
--- a/builds/msvc/properties/Debug.props
+++ b/builds/msvc/properties/Debug.props
@@ -17,6 +17,9 @@
ProgramDatabase
true
true
+
+ OnlyExplicitInline
Disabled
_DEBUG;%(PreprocessorDefinitions)
diff --git a/include/bitcoin/database/impl/memory/mmap_private.ipp b/include/bitcoin/database/impl/memory/mmap_private.ipp
index 8d4046723..ad5cacc75 100644
--- a/include/bitcoin/database/impl/memory/mmap_private.ipp
+++ b/include/bitcoin/database/impl/memory/mmap_private.ipp
@@ -110,9 +110,9 @@ template
bool CLASS::remap_all_(size_t capacity, std::index_sequence,
bool final) NOEXCEPT
{
- // Probe the wave's disk requirement before touching any column file: a
- // refused wave then retains no surplus provisioning (columns cannot be
- // trimmed after a partial wave, as msc cannot shrink a mapped file).
+ // Probed before touching any column file: a refused wave then retains no
+ // surplus provisioning (a partial wave cannot be trimmed, as msc cannot
+ // shrink a mapped file).
if (!probe_(capacity))
{
if (final)
@@ -377,9 +377,9 @@ bool CLASS::resize_(size_t size, bool final) NOEXCEPT
}
// The wave probe reserves the whole extension plus headroom on the store
-// volume (column widths sum to the stride), released upon the grant: a
-// refused wave touches no column file, and a granted one leaves the
-// headroom unclaimed.
+// volume (column widths sum to the stride) leaves the headroom unclaimed.
+// An unmeasurable volume admits the wave: growth failure is the store's own
+// disk full detection, and a query failure is not an exhaustion signal.
TEMPLATE
bool CLASS::probe_(size_t capacity) NOEXCEPT
{
@@ -387,29 +387,14 @@ bool CLASS::probe_(size_t capacity) NOEXCEPT
const auto bytes = ceilinged_multiply(
floored_subtract(capacity, file_.load()), stride);
- if (is_zero(bytes))
+ if (is_zero(bytes) || is_zero(headroom_))
return true;
- auto name = filenames_.front();
- name += ".probe";
- auto probe = file::invalid;
- if (file::create_file(name))
- probe = file::open(name);
-
- const auto reserve = ceilinged_add(bytes, headroom_);
-#if !defined(WITHOUT_FALLOCATE)
- const auto held = (probe != file::invalid) &&
- (::fallocate(probe, 0, zero, reserve) != fail);
-#else
- const auto held = (probe != file::invalid) &&
- (::ftruncate(probe, reserve) != fail);
-#endif
-
- if (probe != file::invalid)
- file::close(probe);
+ size_t available{};
+ if (!file::space(available, filenames_.front()))
+ return true;
- file::remove(name);
- return held;
+ return available >= ceilinged_add(bytes, headroom_);
}
// Finalize failure results in unmapped.