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