diff options
author | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-08-17 08:17:48 +0000 |
---|---|---|
committer | Ronnie Sahlberg <ronnie_sahlberg@ozemail.com.au> | 2006-08-17 08:17:48 +0000 |
commit | 2fdf0e4b4b5634a44ed1911fa8f023883bad8292 (patch) | |
tree | 7a59e3b11c5d2f49a92114b805e90f358e7db8a9 /epan/emem.c | |
parent | c7250199a7332fde12811ec48902c96f0aed049f (diff) |
add trees with PErmanent allocation scope which will be useful for constructing
associative arrays for globally unique and persistent mappings such as
oid to name
sid to name
guid to name
svn path=/trunk/; revision=18937
Diffstat (limited to 'epan/emem.c')
-rw-r--r-- | epan/emem.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/epan/emem.c b/epan/emem.c index 7a64bc2928..e1a4615b87 100644 --- a/epan/emem.c +++ b/epan/emem.c @@ -1328,6 +1328,23 @@ se_tree_create_non_persistent(int type, char *name) return tree_list; } +/* This tree is PErmanent and will never be released + */ +emem_tree_t * +pe_tree_create(int type, char *name) +{ + emem_tree_t *tree_list; + + tree_list=g_malloc(sizeof(emem_tree_t)); + tree_list->next=NULL; + tree_list->type=type; + tree_list->tree=NULL; + tree_list->name=name; + tree_list->malloc=g_malloc; + + return tree_list; +} + /* create another (sub)tree using the same memory allocation scope * as the parent tree. */ |