diff --git a/tcmalloc/BUILD b/tcmalloc/BUILD index cb2d0245e..17dedc5e8 100644 --- a/tcmalloc/BUILD +++ b/tcmalloc/BUILD @@ -320,6 +320,7 @@ create_tcmalloc_libraries( "@com_google_absl//absl/base", "@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/base:dynamic_annotations", + "@com_google_absl//absl/base:malloc_internal", "@com_google_absl//absl/base:nullability", "@com_google_absl//absl/container:fixed_array", "@com_google_absl//absl/container:flat_hash_map", diff --git a/tcmalloc/deallocation_profiler.cc b/tcmalloc/deallocation_profiler.cc index 60539c471..85f2498f3 100644 --- a/tcmalloc/deallocation_profiler.cc +++ b/tcmalloc/deallocation_profiler.cc @@ -717,6 +717,8 @@ DeallocationSample::DeallocationSample(DeallocationProfilerList* list) { profiler_ = std::make_unique(list); } +DeallocationSample::~DeallocationSample() = default; + tcmalloc::Profile DeallocationSample::Stop() && { if (profiler_ != nullptr) { tcmalloc::Profile profile = profiler_->Stop(); diff --git a/tcmalloc/deallocation_profiler.h b/tcmalloc/deallocation_profiler.h index 9b711c581..867d0e827 100644 --- a/tcmalloc/deallocation_profiler.h +++ b/tcmalloc/deallocation_profiler.h @@ -50,7 +50,7 @@ class DeallocationSample final public: explicit DeallocationSample(DeallocationProfilerList* list); // We define the dtor to ensure it is placed in the desired text section. - ~DeallocationSample() override = default; + ~DeallocationSample() override; tcmalloc::Profile Stop() && override;