Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hycdong committed Nov 29, 2019
1 parent 0a4cdf5 commit 2e2a572
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 4 additions & 1 deletion src/dist/replication/lib/replica_stub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
5 changes: 0 additions & 5 deletions src/dist/replication/lib/replica_stub.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,6 @@ class replica_stub : public serverlet<replica_stub>, 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
Expand Down

0 comments on commit 2e2a572

Please sign in to comment.