fix unbandled build & add comment

This commit is contained in:
chertus 2019-07-16 17:18:01 +03:00
parent 7065504d5e
commit 4bc79bca35
4 changed files with 12 additions and 4 deletions

View File

@ -17,6 +17,7 @@ namespace DB
static constexpr size_t log_peak_memory_usage_every = 1ULL << 30;
/// Each thread could new/delete memory in range of (-untracked_memory_limit, untracked_memory_limit) without access to common counters.
static constexpr Int64 untracked_memory_limit = 4 * 1024 * 1024;

View File

@ -9,6 +9,5 @@
#cmakedefine01 USE_CPUINFO
#cmakedefine01 USE_BROTLI
#cmakedefine01 USE_MIMALLOC
#cmakedefine01 USE_JEMALLOC
#cmakedefine01 CLICKHOUSE_SPLIT_BINARY

View File

@ -7,6 +7,16 @@
#include <common/config_common.h>
#endif
#if USE_JEMALLOC
#include <jemalloc/jemalloc.h>
#if JEMALLOC_VERSION_MAJOR < 4
#undef USE_JEMALLOC
#define USE_JEMALLOC 0
#include <cstdlib>
#endif
#endif
#if defined(_MSC_VER)
#define ALWAYS_INLINE __forceinline
#define NO_INLINE static __declspec(noinline)
@ -17,8 +27,6 @@
#if USE_JEMALLOC
#include <jemalloc/jemalloc.h>
namespace JeMalloc
{

View File

@ -5,7 +5,7 @@
namespace JeMalloc
{
void * handleOOM(std::size_t size, bool nothrow)
NO_INLINE void * handleOOM(std::size_t size, bool nothrow)
{
void * ptr = nullptr;