Bitcoin Core 32.99.0
P2P Digital Currency
Loading...
Searching...
No Matches
caches.h
Go to the documentation of this file.
1// Copyright (c) 2021-present The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_NODE_CACHES_H
6#define BITCOIN_NODE_CACHES_H
7
8#include <kernel/caches.h>
9#include <util/byte_units.h>
10
11#include <algorithm>
12#include <cstddef>
13#include <cstdint>
14
15class ArgsManager;
16
19
20namespace node {
38
39void LogOversizedDbCache(const ArgsManager& args) noexcept;
40} // namespace node
41
42#endif // BITCOIN_NODE_CACHES_H
ArgsManager & args
Definition bitcoind.cpp:280
constexpr uint64_t DEFAULT_KERNEL_CACHE
Suggested default amount of cache reserved for the kernel (bytes)
Definition caches.h:19
CacheSizes CalculateCacheSizes(const ArgsManager &args, size_t n_indexes)
Definition caches.cpp:57
void LogOversizedDbCache(const ArgsManager &args) noexcept
Definition caches.cpp:85
constexpr bool ShouldWarnOversizedDbCache(uint64_t dbcache, uint64_t total_ram) noexcept
Definition caches.h:32
uint64_t GetDefaultDBCache()
Definition caches.cpp:37
constexpr uint64_t DBCACHE_WARNING_RESERVED_RAM
Reserved non-dbcache memory usage.
Definition caches.h:18
IndexCacheSizes index
Definition caches.h:28
kernel::CacheSizes kernel
Definition caches.h:29
uint64_t txospender_index
Definition caches.h:25
uint64_t filter_index
Definition caches.h:24
uint64_t tx_index
Definition caches.h:23
constexpr auto Ticks(Dur2 d)
Helper to count the seconds of a duration/time_point.
Definition time.h:82