diff options
author | Jeff Morriss <jeff.morriss@ulticom.com> | 2009-10-20 17:43:05 +0000 |
---|---|---|
committer | Jeff Morriss <jeff.morriss@ulticom.com> | 2009-10-20 17:43:05 +0000 |
commit | 78318b32ee83e2e2834a2a38d1ad1abcbf716ac2 (patch) | |
tree | 20af9bf5a0c20b896b67c0572499d79448297be1 /epan/emem.h | |
parent | 8ec5a160ecbe147ef92b86d0595703dd4ebe36da (diff) |
Add emem_init() which initializes both the ep_ and se_ allocators; have all
callers use that instead of initializing each allocator individually.
svn path=/trunk/; revision=30646
Diffstat (limited to 'epan/emem.h')
-rw-r--r-- | epan/emem.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/epan/emem.h b/epan/emem.h index d8e3cfaff0..374a6f587d 100644 --- a/epan/emem.h +++ b/epan/emem.h @@ -28,6 +28,12 @@ #include "gnuc_format_check.h" +/* Initialize all the memory allocation pools described below. + * This function must be called once when *shark initialize to set up the + * required structures. + */ +void emem_init(void); + /* Functions for handling memory allocation and garbage collection with * a packet lifetime scope. * These functions are used to allocate memory that will only remain persistent @@ -39,10 +45,6 @@ * Everytime a new packet is dissected, all memory allocations done in * the previous packet is freed. */ -/* Initialize packet-lifetime memory allocation pool. This function is called - * once when [t]Wireshark is initialized to set up the required structures. - */ -void ep_init_chunk(void); /* Allocate memory with a packet lifetime scope */ void *ep_alloc(size_t size); @@ -128,10 +130,6 @@ void* ep_stack_pop(ep_stack_t stack); * * These functions are very fast and offer automatic garbage collection. */ -/* Initialize capture-lifetime memory allocation pool. This function is called - * once when [t]Wireshark is initialized to set up the required structures. - */ -void se_init_chunk(void); /* Allocate memory with a capture lifetime scope */ void *se_alloc(size_t size); |