Bitcoin ABC 0.30.5
P2P Digital Currency
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) {
11 (void)cbopaque;
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
22void (*malloc_message)(void *cbopaque, const char *s) = &_drop_malloc_message;
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)