Merge pull request #24256 from ClickHouse/log-exception-for-allocator-free

Log exception in Allocator::free
This commit is contained in:
Nikolai Kochetov 2021-05-19 13:39:39 +03:00 committed by GitHub
commit 0b8bf34aba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,11 +98,19 @@ public:
/// Free memory range.
void free(void * buf, size_t size)
{
try
{
checkSize(size);
freeNoTrack(buf, size);
CurrentMemoryTracker::free(size);
}
catch (...)
{
DB::tryLogCurrentException("Allocator::free");
throw;
}
}
/** Enlarge memory range.
* Data from old range is moved to the beginning of new range.