feat remove static for __attribute__((constructor))
This commit is contained in:
parent
8204b6db92
commit
47f4beac5e
@ -63,7 +63,7 @@ private:
|
|||||||
namespace { \
|
namespace { \
|
||||||
static void google_init_module_##name() { body; } \
|
static void google_init_module_##name() { body; } \
|
||||||
GoogleInitializer google_initializer_module_##name(#name, google_init_module_##name, NULL); \
|
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(); \
|
google_initializer_module_##name.module_name(); \
|
||||||
} \
|
} \
|
||||||
|
@ -423,7 +423,7 @@ LogMappingEvent(const tcmalloc::MappingEvent &evt)
|
|||||||
extern "C" void
|
extern "C" void
|
||||||
HeapProfilerStart(const char *prefix)
|
HeapProfilerStart(const char *prefix)
|
||||||
{
|
{
|
||||||
SpinLockHolder l(&heap_lock);
|
SpinLockHolder lock(&heap_lock);
|
||||||
|
|
||||||
if (is_on) return;
|
if (is_on) return;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user