diff options
author | Evan Huus <eapache@gmail.com> | 2012-11-24 19:02:05 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2012-11-24 19:02:05 +0000 |
commit | 706211b6420309ad42405498b5b5601e0f31d251 (patch) | |
tree | 52efde23b58ed321454877f836916aa587f88297 /epan | |
parent | 319891ade38636ee181b2fac91405f21b694d3fd (diff) |
Make the wmem scopes friendly to the valgrind script like emem is.
svn path=/trunk/; revision=46171
Diffstat (limited to 'epan')
-rw-r--r-- | epan/wmem/wmem_scopes.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/epan/wmem/wmem_scopes.c b/epan/wmem/wmem_scopes.c index c0160ea817..64ede1ae8c 100644 --- a/epan/wmem/wmem_scopes.c +++ b/epan/wmem/wmem_scopes.c @@ -23,6 +23,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#include <stdlib.h> + #include <glib.h> #include "wmem_scopes.h" @@ -151,7 +153,13 @@ wmem_init_scopes(void) g_assert(in_packet_scope == FALSE); g_assert(in_file_scope == FALSE); - packet_scope = wmem_create_block_allocator(); + if (getenv("WIRESHARK_DEBUG_WMEM_PACKET_NO_CHUNKS")) { + packet_scope = wmem_create_glib_allocator(); + } + else { + packet_scope = wmem_create_block_allocator(); + } + file_scope = wmem_create_glib_allocator(); epan_scope = wmem_create_glib_allocator(); } |