fix compile

This commit is contained in:
Han Fei 2023-02-08 18:06:36 +01:00
parent d9aab84701
commit a4efb1fbda
2 changed files with 5 additions and 6 deletions

View File

@ -7,7 +7,6 @@
#include <Common/Concepts.h>
#include <Common/CurrentMemoryTracker.h>
#include <Common/gwp_asan.h>
#include "config.h"
#if USE_JEMALLOC
@ -19,6 +18,8 @@
#endif
#if USE_GWP_ASAN
# include <gwp_asan/guarded_pool_allocator.h>
static gwp_asan::GuardedPoolAllocator GuardedAlloc;
#endif

View File

@ -24,6 +24,9 @@ extern "C"
}
#if USE_GWP_ASAN
#include <gwp_asan/optional/options_parser.h>
/// Both clickhouse_new_delete and clickhouse_common_io links gwp_asan, but It should only init once, otherwise it
/// will cause unexpected deadlock.
static struct InitGwpAsan
@ -34,11 +37,6 @@ static struct InitGwpAsan
gwp_asan::options::Options &opts = gwp_asan::options::getOptions();
GuardedAlloc.init(opts);
}
static bool isInit()
{
return GuardedAlloc.getAllocatorState()->GuardedPagePoolEnd != 0;
}
} init_gwp_asan;
#endif