Fix build failures due to missing JEMALLOC_CXX_THROW macro (#5053)

Summary:
JEMALLOC_CXX_THROW is not defined for earlier versions of jemalloc (e.g. 3.6), causing builds to fail on some platforms. Fixing it. Closes #4869
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5053

Differential Revision: D14390034

Pulled By: sagar0

fbshipit-source-id: b2b7a03cd377201ef385eb521f65bae85c558055
This commit is contained in:
Yi Wu 2019-03-08 17:02:00 -08:00 committed by Facebook Github Bot
parent c4e00cf10a
commit 8a1ecd1982
2 changed files with 8 additions and 0 deletions

View File

@ -6,6 +6,10 @@
### Public API Change
* statistics.stats_level_ becomes atomic. It is preferred to use statistics.set_stats_level() and statistics.get_stats_level() to access it.
### Bug Fixes
* Fix JEMALLOC_CXX_THROW macro missing from older Jemalloc versions, causing build failures on some platforms.
## 6.0.0 (2/19/2019)
### New Features
* Enabled checkpoint on readonly db (DBImplReadOnly).

View File

@ -12,6 +12,10 @@
#include <jemalloc/jemalloc.h>
#endif
#ifndef JEMALLOC_CXX_THROW
#define JEMALLOC_CXX_THROW
#endif
// Declare non-standard jemalloc APIs as weak symbols. We can null-check these
// symbols to detect whether jemalloc is linked with the binary.
extern "C" void* mallocx(size_t, int) __attribute__((__weak__));