39 if constexpr (
sizeof(
void*) >= 8) {
50 if (*db_cache < 0) db_cache = 0;
51 const uint64_t db_cache_bytes{SaturatingLeftShift<uint64_t>(*db_cache, 20)};
91 db_cache / 1_MiB, *total_ram / 1_MiB)});
static constexpr uint64_t MAX_TXOSPENDER_INDEX_CACHE
Max memory allocated to tx spenderindex DB specific cache in bytes.
static constexpr uint64_t HIGH_DEFAULT_DBCACHE
Larger default dbcache on 64-bit systems with enough RAM.
static constexpr uint64_t MAX_FILTER_INDEX_CACHE
Max memory allocated to all block filter index caches combined in bytes.
static constexpr uint64_t HIGH_DEFAULT_DBCACHE_MIN_TOTAL_RAM
Minimum detected RAM required for HIGH_DEFAULT_DBCACHE.
static constexpr uint64_t MAX_TX_INDEX_CACHE
Max memory allocated to tx index DB specific cache in bytes.
int64_t GetIntArg(const std::string &strArg, int64_t nDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
bool GetBoolArg(const std::string &strArg, bool fDefault) const EXCLUSIVE_LOCKS_REQUIRED(!cs_args)
Return boolean argument or default value.
std::optional< uint64_t > TryGetTotalRam()
Return the total RAM available on the current system, if detectable.
void InitWarning(const bilingual_str &str)
Show warning message.
constexpr uint64_t MAX_DBCACHE_BYTES
Maximum total database cache on current architecture (bytes)
constexpr uint64_t DEFAULT_KERNEL_CACHE
Suggested default amount of cache reserved for the kernel (bytes)
constexpr uint64_t MIN_DBCACHE_BYTES
Minimum total database cache (bytes)
CacheSizes CalculateCacheSizes(const ArgsManager &args, size_t n_indexes)
void LogOversizedDbCache(const ArgsManager &args) noexcept
uint64_t CalculateDbCacheBytes(const ArgsManager &args)
constexpr bool ShouldWarnOversizedDbCache(uint64_t dbcache, uint64_t total_ram) noexcept
uint64_t GetDefaultDBCache()
uint64_t txospender_index
consteval auto _(util::TranslatedLiteral str)
constexpr bool DEFAULT_TXINDEX
constexpr bool DEFAULT_TXOSPENDERINDEX