提交 b6daeae6 编写于 作者: H Hongze Cheng

more

上级 a641e5b5
...@@ -26,9 +26,6 @@ struct SPCache { ...@@ -26,9 +26,6 @@ struct SPCache {
SPage ** pgHash; SPage ** pgHash;
int nRecyclable; int nRecyclable;
SPage lru; SPage lru;
int nDirty;
SPage * pDirty;
SPage * pDirtyTail;
}; };
#define PCACHE_PAGE_HASH(pPgid) \ #define PCACHE_PAGE_HASH(pPgid) \
...@@ -248,9 +245,5 @@ static int tdbPCacheOpenImpl(SPCache *pCache) { ...@@ -248,9 +245,5 @@ static int tdbPCacheOpenImpl(SPCache *pCache) {
pCache->lru.pLruNext = &(pCache->lru); pCache->lru.pLruNext = &(pCache->lru);
pCache->lru.pLruPrev = &(pCache->lru); pCache->lru.pLruPrev = &(pCache->lru);
// Open dirty list
pCache->nDirty = 0;
pCache->pDirty = pCache->pDirtyTail = NULL;
return 0; return 0;
} }
\ No newline at end of file
...@@ -25,6 +25,9 @@ struct SPFile { ...@@ -25,6 +25,9 @@ struct SPFile {
SPCache *pCache; SPCache *pCache;
SPgno dbFileSize; SPgno dbFileSize;
SPgno dbOrigSize; SPgno dbOrigSize;
int nDirty;
SPage * pDirty;
SPage * pDirtyTail;
}; };
static int tdbPFileReadPage(SPFile *pFile, SPage *pPage); static int tdbPFileReadPage(SPFile *pFile, SPage *pPage);
......
...@@ -20,13 +20,12 @@ ...@@ -20,13 +20,12 @@
extern "C" { extern "C" {
#endif #endif
typedef struct STEnv STEnv; typedef struct STEnv {
struct STEnv {
char * rootDir; char * rootDir;
char * jfname; char * jfname;
int jfd; int jfd;
SPCache *pCache; SPCache *pCache;
}; } STEnv;
int tdbEnvOpen(const char *rootDir, int pageSize, int cacheSize, STEnv **ppEnv); int tdbEnvOpen(const char *rootDir, int pageSize, int cacheSize, STEnv **ppEnv);
int tdbEnvClose(STEnv *pEnv); int tdbEnvClose(STEnv *pEnv);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册