mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 03:12:43 +00:00
17 lines
498 B
C++
17 lines
498 B
C++
|
#include <Common/MemoryTrackerBlockerInThread.h>
|
||
|
|
||
|
// MemoryTrackerBlockerInThread
|
||
|
thread_local uint64_t MemoryTrackerBlockerInThread::counter = 0;
|
||
|
thread_local VariableContext MemoryTrackerBlockerInThread::level = VariableContext::Global;
|
||
|
MemoryTrackerBlockerInThread::MemoryTrackerBlockerInThread(VariableContext level_)
|
||
|
: previous_level(level)
|
||
|
{
|
||
|
++counter;
|
||
|
level = level_;
|
||
|
}
|
||
|
MemoryTrackerBlockerInThread::~MemoryTrackerBlockerInThread()
|
||
|
{
|
||
|
--counter;
|
||
|
level = previous_level;
|
||
|
}
|