mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 16:50:48 +00:00
Added comments #2980
This commit is contained in:
parent
e0b1b5ff78
commit
06053d9c1f
@ -26,8 +26,10 @@ namespace DB
|
||||
*/
|
||||
struct Memory : boost::noncopyable, Allocator<false>
|
||||
{
|
||||
/// Padding is needed to allow usage of 'memcpySmallAllowReadWriteOverflow15' function with this buffer.
|
||||
static constexpr size_t pad_right = 15;
|
||||
size_t m_capacity = 0;
|
||||
|
||||
size_t m_capacity = 0; /// With padding.
|
||||
size_t m_size = 0;
|
||||
char * m_data = nullptr;
|
||||
size_t alignment = 0;
|
||||
@ -70,7 +72,8 @@ struct Memory : boost::noncopyable, Allocator<false>
|
||||
{
|
||||
if (0 == m_capacity)
|
||||
{
|
||||
m_size = m_capacity = new_size;
|
||||
m_size = new_size;
|
||||
m_capacity = new_size;
|
||||
alloc();
|
||||
}
|
||||
else if (new_size <= m_size)
|
||||
|
Loading…
Reference in New Issue
Block a user