more
This commit is contained in:
parent
a641e5b544
commit
b6daeae6bf
|
@ -26,9 +26,6 @@ struct SPCache {
|
|||
SPage ** pgHash;
|
||||
int nRecyclable;
|
||||
SPage lru;
|
||||
int nDirty;
|
||||
SPage * pDirty;
|
||||
SPage * pDirtyTail;
|
||||
};
|
||||
|
||||
#define PCACHE_PAGE_HASH(pPgid) \
|
||||
|
@ -248,9 +245,5 @@ static int tdbPCacheOpenImpl(SPCache *pCache) {
|
|||
pCache->lru.pLruNext = &(pCache->lru);
|
||||
pCache->lru.pLruPrev = &(pCache->lru);
|
||||
|
||||
// Open dirty list
|
||||
pCache->nDirty = 0;
|
||||
pCache->pDirty = pCache->pDirtyTail = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -25,6 +25,9 @@ struct SPFile {
|
|||
SPCache *pCache;
|
||||
SPgno dbFileSize;
|
||||
SPgno dbOrigSize;
|
||||
int nDirty;
|
||||
SPage * pDirty;
|
||||
SPage * pDirtyTail;
|
||||
};
|
||||
|
||||
static int tdbPFileReadPage(SPFile *pFile, SPage *pPage);
|
||||
|
|
|
@ -20,13 +20,12 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct STEnv STEnv;
|
||||
struct STEnv {
|
||||
typedef struct STEnv {
|
||||
char * rootDir;
|
||||
char * jfname;
|
||||
int jfd;
|
||||
SPCache *pCache;
|
||||
};
|
||||
} STEnv;
|
||||
|
||||
int tdbEnvOpen(const char *rootDir, int pageSize, int cacheSize, STEnv **ppEnv);
|
||||
int tdbEnvClose(STEnv *pEnv);
|
||||
|
|
Loading…
Reference in New Issue