Skip to content
Bitcoin Roots

v29.4-roots.2 · Commit 2: [PATCH 02/21] runtime: preserve shared operator controls

src/common/system_ram.h

Before: /dev/null · After: src/common/system_ram.h

File metadata
new file mode 100644
index 0000000000000000000000000000000000000000..031f9c2768c6ef78ff2a79fd98923171d44fc76e

Download original patch · Release notes

Diff rows 1–17 of 17. Line numbers refer to the original before/after files.

+ Added− RemovedUnmarked lines are context.

Scroll the code area horizontally to read long lines. The two line-number columns refer to before and after.

src/common/system_ram.h ADDED
@@ -0,0 +1,17 @@
1
+ // Copyright (c) 2009-2010 Satoshi Nakamoto
2
+ // Copyright (c) 2009-present The Bitcoin Core developers
3
+ // Distributed under the MIT software license, see the accompanying
4
+ // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
+
6
+ #ifndef BITCOIN_COMMON_SYSTEM_RAM_H
7
+ #define BITCOIN_COMMON_SYSTEM_RAM_H
8
+
9
+ #include <cstddef>
10
+ #include <optional>
11
+
12
+ /**
13
+ * Return the total RAM available on the current system, if detectable.
14
+ */
15
+ std::optional<size_t> TryGetTotalRam();
16
+
17
+ #endif // BITCOIN_COMMON_SYSTEM_RAM_H