1
0
Fork 0

malloc_stats_print under Linux, je_malloc_stats_print under Apple

This commit is contained in:
Frank Celler 2017-04-19 20:40:34 +02:00
parent 1a6cadbfe1
commit 9064305c95
1 changed files with 4 additions and 0 deletions

View File

@ -605,7 +605,11 @@ static void DumpMallocStats(std::string* stats) {
std::unique_ptr<char> buf{new char[kMallocStatusLen + 1]};
mstat.cur = buf.get();
mstat.end = buf.get() + kMallocStatusLen;
#ifdef __APPLE__
je_malloc_stats_print(GetJemallocStatus, &mstat, "");
#else
malloc_stats_print(GetJemallocStatus, &mstat, "");
#endif
stats->append(buf.get());
#endif // ROCKSDB_JEMALLOC
}