google / tcmalloc

Apache License 2.0
4.41k stars 480 forks source link

fix percpu ODR linker warning #256

Closed lano1106 closed 3 months ago

lano1106 commented 3 months ago

The following warning was received: INFO: From Linking tcmalloc/libtcmalloc.so: tcmalloc/internal/percpu.cc:65:30: warning: 'tcmalloc_sampler' violates the C++ One Definition Rule [-Wodr] ./tcmalloc/sampler.h:89:7: note: type name 'tcmalloc::tcmalloc_internal::Sampler' should match type name 'char' ./tcmalloc/allocation_sampling.h:57:58: note: 'tcmalloc_sampler' was previously declared here

the commit change is correcting the ODR problem.

google-cla[bot] commented 3 months ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.