diff --git a/tcmalloc/internal/percpu.cc b/tcmalloc/internal/percpu.cc index d3a9d0b3c..c6655efb9 100644 --- a/tcmalloc/internal/percpu.cc +++ b/tcmalloc/internal/percpu.cc @@ -42,6 +42,7 @@ GOOGLE_MALLOC_SECTION_BEGIN namespace tcmalloc { namespace tcmalloc_internal { +class Sampler; namespace subtle { namespace percpu { @@ -62,7 +63,7 @@ ABSL_CONST_INIT static absl::once_flag init_per_cpu_once; ABSL_CONST_INIT static std::atomic using_upstream_fence{false}; #endif // TCMALLOC_INTERNAL_PERCPU_USE_RSEQ -extern "C" thread_local char tcmalloc_sampler ABSL_ATTRIBUTE_INITIAL_EXEC; +extern "C" thread_local Sampler tcmalloc_sampler ABSL_ATTRIBUTE_INITIAL_EXEC; static bool InitThreadPerCpu() { // If we're already registered, there's nothing further for us to do.