dbms: fixed memory tracking [#METR-14301].

This commit is contained in:
Alexey Milovidov 2014-12-15 08:23:44 +03:00
parent 4bc31f666c
commit 9527462193
2 changed files with 6 additions and 6 deletions

View File

@ -202,12 +202,12 @@ public:
{
if (start + length > data.size())
throw Exception("Parameters start = "
+ toString(start) + ", length = "
+ toString(length) + " are out of bound in IColumnVector<T>::cut() method"
" (data.size() = " + toString(data.size()) + ").",
ErrorCodes::PARAMETER_OUT_OF_BOUND);
+ toString(start) + ", length = "
+ toString(length) + " are out of bound in IColumnVector<T>::cut() method"
" (data.size() = " + toString(data.size()) + ").",
ErrorCodes::PARAMETER_OUT_OF_BOUND);
Self * res = new Self(length);
Self * res = new Self(length);
memcpy(&res->getData()[0], &data[start], length * sizeof(data[0]));
return res;
}

View File

@ -70,7 +70,7 @@ public:
active_threads = max_threads;
threads.reserve(max_threads);
for (size_t i = 0; i < max_threads; ++i)
threads.emplace_back([=] { thread(current_memory_tracker, i); });
threads.emplace_back(std::bind(&ParallelInputsProcessor::thread, this, current_memory_tracker, i));
}
/// Попросить все источники остановиться раньше, чем они иссякнут.