mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 19:42:00 +00:00
Fix error
This commit is contained in:
parent
84f669c113
commit
dd54c7e224
@ -176,10 +176,11 @@ public:
|
||||
}
|
||||
|
||||
/// Get piece of memory, without alignment.
|
||||
/// Note: we expect it will return a non-nullptr even if the size is zero.
|
||||
char * alloc(size_t size)
|
||||
{
|
||||
used_bytes += size;
|
||||
if (unlikely(static_cast<std::ptrdiff_t>(size) > head.end - head.pos))
|
||||
if (unlikely(head.empty() || static_cast<std::ptrdiff_t>(size) > head.end - head.pos))
|
||||
addMemoryChunk(size);
|
||||
|
||||
char * res = head.pos;
|
||||
|
Loading…
Reference in New Issue
Block a user