提交 dca2abd6 编写于 作者: H hzcheng

TD-34

上级 194d37a3
......@@ -70,7 +70,7 @@ void *tsdbAllocFromCache(STsdbCache *pCache, int bytes) {
if (pCache == NULL) return NULL;
if (bytes > pCache->cacheBlockSize) return NULL;
if (isListEmpty(pCache->imem)) {
if (isListEmpty(pCache->mem)) {
if (tsdbAllocBlockFromPool(pCache) < 0) {
// TODO: deal with the error
}
......@@ -114,7 +114,7 @@ static int tsdbAllocBlockFromPool(STsdbCache *pCache) {
pBlock->offset = 0;
pBlock->remain = pCache->cacheBlockSize;
tdListAppendNode(pPool->memPool, node);
tdListAppendNode(pCache->mem, node);
pCache->curBlock = pBlock;
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册