提交 30649dc6 编写于 作者: S Siying Dong 提交者: Facebook Github Bot

Have a different function when ROCKSDB_JEMALLOC=0

Summary:
Some sanitizer is not happy with parameter name with ROCKSDB_JEMALLOC not set. Use another function instead.
Closes https://github.com/facebook/rocksdb/pull/3536

Differential Revision: D7064849

Pulled By: siying

fbshipit-source-id: c6ae94e044686176af1259df9172453d52c2f9d5
上级 90eca1e6
......@@ -41,8 +41,8 @@ static void GetJemallocStatus(void* mstat_arg, const char* status) {
}
#endif // ROCKSDB_JEMALLOC
void DumpMallocStats(std::string* stats) {
#ifdef ROCKSDB_JEMALLOC
void DumpMallocStats(std::string* stats) {
MallocStatus mstat;
const unsigned int kMallocStatusLen = 1000000;
std::unique_ptr<char[]> buf{new char[kMallocStatusLen + 1]};
......@@ -50,8 +50,10 @@ void DumpMallocStats(std::string* stats) {
mstat.end = buf.get() + kMallocStatusLen;
je_malloc_stats_print(GetJemallocStatus, &mstat, "");
stats->append(buf.get());
#endif // ROCKSDB_JEMALLOC
}
#else
void DumpMallocStats(std::string*) {}
#endif // ROCKSDB_JEMALLOC
}
#endif // !ROCKSDB_LITE
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册