提交 fa43f86f 编写于 作者: H Haojun Liao

refactor: add an assert.

上级 85c1e3aa
......@@ -1191,7 +1191,6 @@ static int32_t doEnsureCapacity(SColumnInfoData* pColumn, const SDataBlockInfo*
int32_t oldLen = BitmapLen(existedRows);
pColumn->nullbitmap = tmp;
memset(&pColumn->nullbitmap[oldLen], 0, BitmapLen(numOfRows) - oldLen);
ASSERT(pColumn->info.bytes);
// make sure the allocated memory is MALLOC_ALIGN_BYTES aligned
......@@ -1207,6 +1206,8 @@ static int32_t doEnsureCapacity(SColumnInfoData* pColumn, const SDataBlockInfo*
}
pColumn->pData = tmp;
ASSERT((((uint64_t)pColumn->pData) & (MALLOC_ALIGN_BYTES - 1)) == 0x0);
if (clearPayload) {
memset(tmp + pColumn->info.bytes * existedRows, 0, pColumn->info.bytes * (numOfRows - existedRows));
}
......
......@@ -352,8 +352,6 @@ void* taosMemoryMallocAlign(uint32_t alignment, int64_t size) {
#else
#if defined(LINUX)
void* p = memalign(alignment, size);
ASSERT((((uint64_t)p) & (alignment - 1)) == 0x0);
return p;
#else
return taosMemoryMalloc(size);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册