| 127 | // ------------------------------------------------------------ |
| 128 | #ifdef TCMALLOC_ENABLED |
| 129 | static int64_t GetTCMallocProperty(const char* prop) { |
| 130 | size_t value; |
| 131 | if (!MallocExtension::instance()->GetNumericProperty(prop, &value)) { |
| 132 | LOG(DFATAL) << "Failed to get tcmalloc property " << prop; |
| 133 | } |
| 134 | return value; |
| 135 | } |
| 136 | |
| 137 | int64_t GetTCMallocCurrentAllocatedBytes() { |
| 138 | return GetTCMallocProperty("generic.current_allocated_bytes"); |
no outgoing calls
no test coverage detected