diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-08-12 23:27:22 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-08-12 23:27:22 +0000 |
commit | 963f84e7f29a11eab01240bb896a009a55ced0bf (patch) | |
tree | f7992c432469c2488092fa8216688c580b58205d /epan/emem.h | |
parent | 7753e2bb980cbb052917562f4b89ef0c245b4da4 (diff) |
put a memory allocator function pointer inside the tree structure so that all accessor functions become storage scope agnostic
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18888 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/emem.h')
-rw-r--r-- | epan/emem.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/emem.h b/epan/emem.h index a62eb5a9ec..0c6ee93892 100644 --- a/epan/emem.h +++ b/epan/emem.h @@ -173,9 +173,6 @@ typedef struct _se_tree_node_t { void *data; } se_tree_node_t; -/* list of all se trees so they can all be reset automatically when - * we free all se memory - */ /* Right now we only do basic red/black trees but in the future we might want * to try something different, such as a tree where each node keeps track * of how many times it has been looked up, and letting often looked up @@ -188,7 +185,12 @@ typedef struct _se_tree_t { int type; char *name; /* just a string to make debugging easier */ se_tree_node_t *tree; + void *(*malloc)(size_t); } se_tree_t; + +/* list of all se trees so they can all be reset automatically when + * we free all se memory + */ extern se_tree_t *se_trees; |