Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
jemalloc_message.cpp
Go to the documentation of this file.
1// Copyright (c) 2023 The Bitcoin 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#include <jemalloc/jemalloc.h>
6
10static void _drop_malloc_message(void *cbopaque, const char *s) {
12 (void)s;
13
14 // FIXME: figure out how to redirect the write to stdout or the debug.log.
15 // So far all my attempts caused an allocation to happen which crashes the
16 // application immediately. See https://jemalloc.net/jemalloc.3.html.
17 return;
18}
19
20// This is an extern variable from jemalloc, see
21// http://jemalloc.net/jemalloc.3.html
static void _drop_malloc_message(void *cbopaque, const char *s)
Using the signature of jemalloc's malloc_message(), drop the string entirely.
void(* malloc_message)(void *cbopaque, const char *s)
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85