more
This commit is contained in:
parent
9dd59b41e0
commit
5a17541b71
|
@ -17,16 +17,20 @@
|
|||
#define _TD_VNODE_ALLOCATOR_POOL_H_
|
||||
|
||||
#include "vnode.h"
|
||||
#include "vnodeMemAllocator.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
int nexta;
|
||||
int enda;
|
||||
SVMemAllocator allocators[3];
|
||||
} SVAllocatorPool;
|
||||
|
||||
int vnodeOpenAllocatorPool(SVnode *pVnode);
|
||||
void vnodeCloseAllocatorPool(SVnode *pVnode);
|
||||
int vnodeOpenAllocatorPool(SVnode *pVnode);
|
||||
void vnodeCloseAllocatorPool(SVnode *pVnode);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ struct SVnode {
|
|||
SVnodeOptions options;
|
||||
SVState state;
|
||||
SVAllocatorPool pool;
|
||||
SVMemAllocator* inuse;
|
||||
SMeta* pMeta;
|
||||
STsdb* pTsdb;
|
||||
STQ* pTq;
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
|
||||
*
|
||||
* This program is free software: you can use, redistribute, and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3
|
||||
* or later ("AGPL"), as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _TD_VNODE_MEM_ALLOCATOR_H_
|
||||
#define _TD_VNODE_MEM_ALLOCATOR_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
} SVMemAllocator;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*_TD_VNODE_MEM_ALLOCATOR_H_*/
|
|
@ -21,5 +21,5 @@ int vnodeOpenAllocatorPool(SVnode *pVnode) {
|
|||
}
|
||||
|
||||
void vnodeCloseAllocatorPool(SVnode *pVnode) {
|
||||
// TODO
|
||||
// TODO
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
|
||||
*
|
||||
* This program is free software: you can use, redistribute, and/or modify
|
||||
* it under the terms of the GNU Affero General Public License, version 3
|
||||
* or later ("AGPL"), as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
Loading…
Reference in New Issue