MCPcopy Create free account
hub / github.com/defold/defold / Initialize

Function Initialize

engine/dlib/src/dlib/memprofile.cpp:134–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

132 bool g_IsEnabled = false;
133
134 void Initialize()
135 {
136 if (!dLib::IsDebugMode())
137 return;
138#if defined(__MACH__) || defined(__linux__) && !defined(ANDROID) && !defined(__EMSCRIPTEN__)
139 void (*init)(dmMemProfile::InternalData*) = (void (*)(dmMemProfile::InternalData*)) dlsym(RTLD_DEFAULT, "dmMemProfileInitializeLibrary");
140 if (init)
141 {
142 dmMemProfile::InternalData data;
143 data.m_Stats = &dmMemProfile::g_Stats;
144 data.m_IsEnabled = &dmMemProfile::g_IsEnabled;
145 data.m_PropertyRegisterGroup = ProfileRegisterPropertyGroup;
146 data.m_PropertyRegisterU32 = ProfileRegisterPropertyU32;
147 data.m_PropertyAddU32 = ProfilePropertyAddU32;
148
149 init(&data);
150 }
151#endif
152 }
153
154 void Finalize()
155 {

Callers

nothing calls this directly

Calls 2

IsDebugModeFunction · 0.85
initFunction · 0.50

Tested by

no test coverage detected