We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e6765c commit a5adc9aCopy full SHA for a5adc9a
src/dbwrapper.cpp
@@ -70,6 +70,26 @@ bool dbwrapper_SanityCheck()
70
return true;
71
}
72
73
+#ifndef WIN32
74
+namespace leveldb {
75
+class EnvPosixTestHelper {
76
+ static void SetReadOnlyMMapLimit(int limit);
77
+public:
78
+ static inline void SetReadOnlyMMapLimitForBitcoin(int limit) { SetReadOnlyMMapLimit(limit); }
79
+};
80
+}
81
+
82
+class BitcoinLevelDBInit {
83
84
+ BitcoinLevelDBInit() {
85
+ if (sizeof(void*) >= 8) {
86
+ leveldb::EnvPosixTestHelper::SetReadOnlyMMapLimitForBitcoin(4096);
87
+ }
88
89
90
+static BitcoinLevelDBInit g_bitcoin_leveldb_init;
91
+#endif
92
93
class CBitcoinLevelDBLogger : public leveldb::Logger {
94
public:
95
// This code is adapted from posix_logger.h, which is why it is using vsprintf.
0 commit comments