]> jfr.im git - irc/quakenet/newserv.git/blame - patricia/patricia_alloc.c
Merge pull request #1 from meeb/meeb
[irc/quakenet/newserv.git] / patricia / patricia_alloc.c
CommitLineData
7a25133f
P
1
2#include <stdlib.h>
3#include "patricia.h"
4#include <assert.h>
5#include "../core/nsmalloc.h"
6
7a25133f 7prefix_t *newprefix() {
b063a11f 8 return nsmalloc(POOL_PATRICIA, sizeof(prefix_t));
7a25133f
P
9}
10
b063a11f
GB
11void freeprefix(prefix_t *prefix) {
12 nsfree(POOL_PATRICIA, prefix);
7a25133f
P
13}
14
7a25133f 15patricia_node_t *newnode() {
b063a11f 16 return nsmalloc(POOL_PATRICIA, sizeof(patricia_node_t));
7a25133f
P
17}
18
b063a11f
GB
19void freenode(patricia_node_t *node) {
20 nsfree(POOL_PATRICIA, node);
7a25133f
P
21}
22
23