15#define MNODE_BLOCK_BYTES (64 * 1024)
16#define MNODE_BLOCK_HEADER_SIZE (sizeof(void *) + sizeof(size_t))
17#define MNODE_BLOCK_SIZE \
18 ((MNODE_BLOCK_BYTES - MNODE_BLOCK_HEADER_SIZE) / sizeof(mnode))
#define CHARSET_PROC_CHAR2INT
Definition charset.h:21
mtree * mtree_load(mtree *mt, FILE *fp, CHARSET_PROC_CHAR2INT char2int)
Definition mtree.c:316
mnode * mtree_query(mtree *mt, const unsigned char *query)
Definition mtree.c:401
void mtree_print_stat(mtree *mt, const char *title)
Definition mtree.c:68
mnode * mtree_rootnode(mtree *mt)
Definition mtree.c:428
void mtree_close(mtree *mt)
Definition mtree.c:118
#define MNODE_BLOCK_SIZE
Definition mtree.h:17
mtree * mtree_open(void)
Definition mtree.c:392
mnode_block * head
Definition mtree.h:41
mnode_block * curr
Definition mtree.h:42
mnode_block * next
Definition mtree.h:34
mnode nodes[MNODE_BLOCK_SIZE]
Definition mtree.h:36
size_t used
Definition mtree.h:35
wordlist * list
Definition mtree.h:28
mnode * low
Definition mtree.h:23
mnode * high
Definition mtree.h:23
unsigned int weight
Definition mtree.h:27
unsigned int code
Definition mtree.h:26
mnode * child
Definition mtree.h:24
CHARSET_PROC_CHAR2INT char2int
Definition mtree.h:50
mnode_arena arena
Definition mtree.h:48
mnode * rootnode
Definition mtree.h:47