diff options
author | Evan Huus <eapache@gmail.com> | 2012-10-27 02:42:05 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2012-10-27 02:42:05 +0000 |
commit | b464dcd8888d1cd8ad4e16022d358d555a27f4fd (patch) | |
tree | 2a100927c562fe065e682b54113cd63f4a1582f2 /epan/epan.c | |
parent | 2ea364607a49c3c73ba0ddadf4ed88e7bf9bce98 (diff) |
Create init and cleanup functions for wmem as a whole.
Call them from epan_init() and epan_cleanup().
Expose a permanent wmem scope for allocations that should only be freed when
epan is done (which is *not* necessarily when the program finishes).
svn path=/trunk/; revision=45805
Diffstat (limited to 'epan/epan.c')
-rw-r--r-- | epan/epan.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/epan/epan.c b/epan/epan.c index 2de4da2938..6e64eece2b 100644 --- a/epan/epan.c +++ b/epan/epan.c @@ -50,6 +50,7 @@ #include "addr_resolv.h" #include "oids.h" #include "emem.h" +#include "wmem/wmem.h" #include "expert.h" #ifdef HAVE_LUA @@ -83,8 +84,9 @@ epan_init(void (*register_all_protocols_func)(register_cb cb, gpointer client_da init_report_err(report_failure_fcn_p, report_open_failure_fcn_p, report_read_failure_fcn_p, report_write_failure_fcn_p); - /* initialize memory allocation subsystem */ + /* initialize memory allocation subsystems */ emem_init(); + wmem_init(); /* initialize the GUID to name mapping table */ guids_init(); @@ -127,6 +129,7 @@ epan_cleanup(void) #endif except_deinit(); host_name_lookup_cleanup(); + wmem_cleanup(); } void |