mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 15:00:51 +01:00
ircd: Add preliminary tcmalloc version check.
This commit is contained in:
parent
7feb0dff79
commit
0f00f21a1d
1 changed files with 27 additions and 0 deletions
27
ircd/ircd.cc
27
ircd/ircd.cc
|
@ -28,6 +28,7 @@
|
|||
namespace ircd
|
||||
{
|
||||
extern const uint boost_version[3];
|
||||
struct tc_version extern const tc_version;
|
||||
|
||||
enum runlevel _runlevel;
|
||||
const enum runlevel &runlevel{_runlevel};
|
||||
|
@ -43,6 +44,14 @@ namespace ircd
|
|||
void main();
|
||||
}
|
||||
|
||||
struct ircd::tc_version
|
||||
{
|
||||
int major, minor;
|
||||
char patch[64];
|
||||
std::string version;
|
||||
tc_version();
|
||||
};
|
||||
|
||||
const std::thread::id
|
||||
ircd::static_thread_id
|
||||
{
|
||||
|
@ -276,6 +285,24 @@ ircd::reflect(const enum runlevel &level)
|
|||
return "??????";
|
||||
}
|
||||
|
||||
/*
|
||||
const char* tc_version(int* major, int* minor, const char** patch);
|
||||
ircd::tc_version::tc_version()
|
||||
:version{::tc_version(&major, &minor, reinterpret_cast<const char **>(&patch))}
|
||||
{}
|
||||
*/
|
||||
|
||||
ircd::tc_version::tc_version()
|
||||
:major{0}
|
||||
,minor{0}
|
||||
,patch{0}
|
||||
,version{"unavailable"}
|
||||
{}
|
||||
|
||||
struct ircd::tc_version
|
||||
const ircd::tc_version
|
||||
{};
|
||||
|
||||
const uint
|
||||
ircd::boost_version[3]
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue