aboutsummaryrefslogtreecommitdiffstats
path: root/epan/emem.h
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-08-12 08:51:08 +0000
committerRonnie Sahlberg <ronnie_sahlberg@ozemail.com.au>2005-08-12 08:51:08 +0000
commit055e2596d970477a6afdae55b1c570d74565e232 (patch)
treedcd726d023398e2a6ad5f1c40fc6b19db81014ec /epan/emem.h
parent960f9cb5e7e95435f6550a5af22529fef4ee8b35 (diff)
downloadwireshark-055e2596d970477a6afdae55b1c570d74565e232.tar.gz
wireshark-055e2596d970477a6afdae55b1c570d74565e232.tar.bz2
wireshark-055e2596d970477a6afdae55b1c570d74565e232.zip
Add beginning of seasonal allocation in addition to the existing ephemeral ones.
svn path=/trunk/; revision=15301
Diffstat (limited to 'epan/emem.h')
-rw-r--r--epan/emem.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/epan/emem.h b/epan/emem.h
index af10c7e637..d2a9487328 100644
--- a/epan/emem.h
+++ b/epan/emem.h
@@ -74,4 +74,30 @@ gchar** ep_strsplit(const gchar* string, const gchar* delimiter, int max_tokens)
/* release all memory allocated in the previous packet dissector */
void ep_free_all(void);
+
+
+
+
+/* Functions for handling memory allocation and garbage collection with
+ * a capture lifetime scope.
+ * These functions are used to allocate memory that will only remain persistent
+ * until ethereal opens a new capture or capture file.
+ * Everytime ethereal starts a new capture or opens a new capture file
+ * all the data allocated through these functions will be released back
+ * to the free pool.
+ *
+ * These functions are very fast and offer automatic garbage collection.
+ */
+/* Initialize capture-lifetime memory allocation pool. This function is called
+ * once when [t]ethereal 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);
+
+/* release all memory allocated */
+void se_free_all(void);
+
+
#endif /* emem.h */