diff options
author | Evan Huus <eapache@gmail.com> | 2012-12-19 00:43:36 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2012-12-19 00:43:36 +0000 |
commit | 5cf858ec52d1f3a05fcaa43ac0571d321244a87e (patch) | |
tree | d2a49636b7fd471647f1f2a0635be5ca45903c17 /epan/epan.c | |
parent | 561525cbb538b030d28aa4951cf77c9f3f286954 (diff) | |
download | wireshark-5cf858ec52d1f3a05fcaa43ac0571d321244a87e.tar.gz |
Dispatch all allocator creations through a single function using an enum to
determine the desired type. This has two advantages over the old way:
- just one environment variable for valgrind to override in order to guarantee
that ALL allocators use memory it can track, and just one place to check that
variable
- allocator owners no longer have to include headers specific to their
allocator, allowing them to change allocators without adjusting all their
#includes
svn path=/trunk/; revision=46604
Diffstat (limited to 'epan/epan.c')
-rw-r--r-- | epan/epan.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/epan/epan.c b/epan/epan.c index d9c19b30e8..27290c3a9c 100644 --- a/epan/epan.c +++ b/epan/epan.c @@ -51,7 +51,6 @@ #include "oids.h" #include "emem.h" #include "wmem/wmem.h" -#include "wmem/wmem_allocator_simple.h" #include "expert.h" #ifdef HAVE_LUA @@ -162,7 +161,7 @@ epan_dissect_init(epan_dissect_t *edt, const gboolean create_proto_tree, const g { g_assert(edt); - edt->pi.pool = wmem_simple_allocator_new(); + edt->pi.pool = wmem_allocator_new(WMEM_ALLOCATOR_SIMPLE); if (create_proto_tree) { edt->tree = proto_tree_create_root(&edt->pi); |