提交 6da314df 编写于 作者: H Hongze Cheng

more TDB

上级 2b0fa6d9
......@@ -31,7 +31,8 @@ extern "C" {
SPage *pLruNext; \
SPage *pLruPrev; \
SPage *pDirtyNext; \
SPager *pPager;
SPager *pPager; \
SPgid pgid;
int tdbPCacheOpen(int pageSize, int cacheSize, SPCache **ppCache);
int tdbPCacheClose(SPCache *pCache);
......
......@@ -22,6 +22,7 @@ extern "C" {
typedef u8 SCell;
// Page header
typedef struct __attribute__((__packed__)) {
u16 flags;
u16 nCells;
......@@ -30,6 +31,7 @@ typedef struct __attribute__((__packed__)) {
u16 nFree;
} SPageHdr;
// Large page header (pageSize >= 65536 (64K))
typedef struct __attribute__((__packed__)) {
u16 flags;
u8 nCells[3];
......@@ -48,7 +50,6 @@ struct SPage {
u8 szOffset;
pthread_spinlock_t lock;
// Fields below used by pager and am
SPgid pgid;
SPageHdr *pPageHdr;
SPageFtr *pPageFtr;
u8 *aCellIdx;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册