Bitcoin Core 28.99.0
P2P Digital Currency
caches.h
Go to the documentation of this file.
1// Copyright (c) 2021 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 <cstddef>
12
13class ArgsManager;
14
16static constexpr size_t MIN_DB_CACHE{4_MiB};
18static constexpr size_t DEFAULT_DB_CACHE{DEFAULT_KERNEL_CACHE};
19
20namespace node {
22 size_t tx_index{0};
23 size_t filter_index{0};
24};
25struct CacheSizes {
28};
29CacheSizes CalculateCacheSizes(const ArgsManager& args, size_t n_indexes = 0);
30} // namespace node
31
32#endif // BITCOIN_NODE_CACHES_H
ArgsManager & args
Definition: bitcoind.cpp:277
static constexpr size_t DEFAULT_KERNEL_CACHE
Suggested default amount of cache reserved for the kernel (bytes)
Definition: caches.h:13
Definition: messages.h:20
CacheSizes CalculateCacheSizes(const ArgsManager &args, size_t n_indexes)
Definition: caches.cpp:24
static constexpr size_t MIN_DB_CACHE
min. -dbcache (bytes)
Definition: caches.h:16
static constexpr size_t DEFAULT_DB_CACHE
-dbcache default (bytes)
Definition: caches.h:18
IndexCacheSizes index
Definition: caches.h:26
kernel::CacheSizes kernel
Definition: caches.h:27
size_t filter_index
Definition: caches.h:23