diff --git a/src/dist/replication/lib/replica_stub.cpp b/src/dist/replication/lib/replica_stub.cpp index a4af340272..9546f2da2a 100644 --- a/src/dist/replication/lib/replica_stub.cpp +++ b/src/dist/replication/lib/replica_stub.cpp @@ -2337,7 +2337,10 @@ replica_stub::get_child_dir(const char *app_type, gpid child_pid, const std::str } #ifdef DSN_ENABLE_GPERF -int64_t replica_stub::get_tcmalloc_numeric_property(const char *prop) +// Get tcmalloc numeric property (name is "prop") value. +// Return -1 if get property failed (property we used will be greater than zero) +// Properties can be found in 'gperftools/malloc_extension.h' +static int64_t get_tcmalloc_numeric_property(const char *prop) { size_t value; if (!::MallocExtension::instance()->GetNumericProperty(prop, &value)) { diff --git a/src/dist/replication/lib/replica_stub.h b/src/dist/replication/lib/replica_stub.h index 1fb6518b67..5fa505d46f 100644 --- a/src/dist/replication/lib/replica_stub.h +++ b/src/dist/replication/lib/replica_stub.h @@ -247,11 +247,6 @@ class replica_stub : public serverlet, public ref_counter error_code error); #ifdef DSN_ENABLE_GPERF - // Get tcmalloc numeric property (name is "prop") value. - // Return -1 if get property failed (property we used will be greater than zero) - // Properties can be found in 'gperftools/malloc_extension.h' - int64_t get_tcmalloc_numeric_property(const char *prop); - // Try to release tcmalloc memory back to operating system void gc_tcmalloc_memory(); #endif