]>
Commit | Line | Data |
---|---|---|
1 | ||
2 | #include <stdlib.h> | |
3 | #include "patricia.h" | |
4 | #include <assert.h> | |
5 | #include "../core/nsmalloc.h" | |
6 | ||
7 | prefix_t *newprefix() { | |
8 | return nsmalloc(POOL_PATRICIA, sizeof(prefix_t)); | |
9 | } | |
10 | ||
11 | void freeprefix(prefix_t *prefix) { | |
12 | nsfree(POOL_PATRICIA, prefix); | |
13 | } | |
14 | ||
15 | patricia_node_t *newnode() { | |
16 | return nsmalloc(POOL_PATRICIA, sizeof(patricia_node_t)); | |
17 | } | |
18 | ||
19 | void freenode(patricia_node_t *node) { | |
20 | nsfree(POOL_PATRICIA, node); | |
21 | } | |
22 | ||
23 |