aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/main.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-07-22 07:46:58 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-07-22 07:46:58 +0000
commitc841beb71b9fb3b0dca979ed3ae7c6b578a80b6f (patch)
tree15ee9511e300d661e303aef5fa85911ed5c1ef5e /gtk/main.c
parent762fc4f4ebe09692c449aa521df1d14ebadc5709 (diff)
EMEM : a simple and FAST api to allocate memory that will be automatically freed() when the next packet is dissected.
This offesr memory allocation with a packet scope making memory leaks less likely and memory management faster. Add initialization calls for both tethereal and ethereal. Convert the ip_to_str() function to use this and avoid doing the silly rotating buffers thing it previously did. We also need an equivalent set of functions for allocation with capture file scope (free when next capture is loaded) but i dont know where to put the free_all call. svn path=/trunk/; revision=14984
Diffstat (limited to 'gtk/main.c')
-rw-r--r--gtk/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/main.c b/gtk/main.c
index 06befcf45e..cb6d50f338 100644
--- a/gtk/main.c
+++ b/gtk/main.c
@@ -138,6 +138,7 @@
#endif
#include "capture_ui_utils.h"
#include "log.h"
+#include "../epan/emem.h"
@@ -1637,6 +1638,8 @@ main(int argc, char *argv[])
char optstring[sizeof(OPTSTRING_INIT) + sizeof(OPTSTRING_CHILD) + sizeof(OPTSTRING_WIN32) - 2] =
OPTSTRING_INIT OPTSTRING_WIN32;
+ /* initialize memory allocation subsystem */
+ ep_init_chunk();
/*** create the compile and runtime version strings ***/
#ifdef _WIN32