| 32 |
}; |
}; |
| 33 |
typedef struct trie_node_pool_t TRIE_NODE_POOL; |
typedef struct trie_node_pool_t TRIE_NODE_POOL; |
| 34 |
|
|
| 35 |
static char trie_node_shm_name[FILE_PATH_LEN]; |
static char trie_node_shm_name[FILE_NAME_LEN]; |
| 36 |
static TRIE_NODE_POOL *p_trie_node_pool; |
static TRIE_NODE_POOL *p_trie_node_pool; |
| 37 |
|
|
| 38 |
int trie_dict_init(const char *filename, int node_count_limit) |
int trie_dict_init(const char *filename, int node_count_limit) |
| 117 |
return 0; |
return 0; |
| 118 |
} |
} |
| 119 |
|
|
| 120 |
int trie_dict_cleanup(void) |
void trie_dict_cleanup(void) |
| 121 |
{ |
{ |
| 122 |
if (p_trie_node_pool == NULL) |
if (p_trie_node_pool == NULL) |
| 123 |
{ |
{ |
| 124 |
return -1; |
return; |
| 125 |
} |
} |
| 126 |
|
|
| 127 |
detach_trie_dict_shm(); |
detach_trie_dict_shm(); |
| 132 |
} |
} |
| 133 |
|
|
| 134 |
trie_node_shm_name[0] = '\0'; |
trie_node_shm_name[0] = '\0'; |
|
|
|
|
return 0; |
|
| 135 |
} |
} |
| 136 |
|
|
| 137 |
int get_trie_dict_shm_readonly(void) |
int get_trie_dict_shm_readonly(void) |