feat remove static for __attribute__((constructor))

This commit is contained in:
tqcq 2024-04-29 23:33:08 +08:00
parent 8204b6db92
commit 47f4beac5e
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ private:
namespace { \
static void google_init_module_##name() { body; } \
GoogleInitializer google_initializer_module_##name(#name, google_init_module_##name, NULL); \
__attribute__((constructor)) static void EnsureConstructorRunsBeforeMain() \
__attribute__((constructor)) void EnsureConstructorRunsBeforeMain() \
{ \
google_initializer_module_##name.module_name(); \
} \

View File

@ -423,7 +423,7 @@ LogMappingEvent(const tcmalloc::MappingEvent &evt)
extern "C" void
HeapProfilerStart(const char *prefix)
{
SpinLockHolder l(&heap_lock);
SpinLockHolder lock(&heap_lock);
if (is_on) return;