google / tcmalloc

Apache License 2.0
4.41k stars 480 forks source link

fix percpu ODR linker warning #257

Open lano1106 opened 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.

ckennelly commented 3 months ago

This is the 4th identical pull request (see #254 #255 #256 ). Is this intentional?

lano1106 commented 3 months ago

I got issues with the google-cla bot... I took me that many attempts to finally set my email addresses acceptable to the bot...

sorry for the noise.