MCPcopy Create free account
hub / github.com/ByConity/ByConity / jemallocOptionEnabled

Function jemallocOptionEnabled

programs/server/Server.cpp:200–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198
199#if USE_JEMALLOC
200static bool jemallocOptionEnabled(const char *name)
201{
202 bool value;
203 size_t size = sizeof(value);
204
205 if (mallctl(name, reinterpret_cast<void *>(&value), &size, /* newp= */ nullptr, /* newlen= */ 0))
206 throw Poco::SystemException("mallctl() failed");
207
208 return value;
209}
210#else
211static bool jemallocOptionEnabled(const char *) { return 0; }
212#endif

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected