aboutsummaryrefslogtreecommitdiffstats
path: root/epan/emem.h
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2012-10-08 15:23:36 +0000
committerEvan Huus <eapache@gmail.com>2012-10-08 15:23:36 +0000
commitb6f0d11c6f538a6214af9e93ce07f8fde227460b (patch)
tree675372de1de864ff91efa2d767c96404fcc5020c /epan/emem.h
parent92c3bc0228b40742c079a03b41f2b25d3e8591d6 (diff)
EDT structures now own their ep_ memory pools. This should finally clean
up the last little bits of: - https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5284 - https://www.wireshark.org/lists/wireshark-dev/201208/msg00128.html and possibly part of: - https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7775 This is a fairly invasive change that required some funky work with linked lists to avoid changing any of the public ep_* APIs, so if something breaks blame me :) svn path=/trunk/; revision=45389
Diffstat (limited to 'epan/emem.h')
-rw-r--r--epan/emem.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/emem.h b/epan/emem.h
index e3b5f37c6f..d61e7b968f 100644
--- a/epan/emem.h
+++ b/epan/emem.h
@@ -34,6 +34,8 @@
*/
void emem_init(void);
+typedef struct _emem_header_t emem_header_t;
+
/* Functions for handling memory allocation and garbage collection with
* a packet lifetime scope.
* These functions are used to allocate memory that will only remain persistent
@@ -46,6 +48,9 @@ void emem_init(void);
* the previous packet is freed.
*/
+emem_header_t *ep_create_pool(void);
+void ep_free_pool(emem_header_t *ep_packet_mem);
+
/** Allocate memory with a packet lifetime scope */
void *ep_alloc(size_t size) G_GNUC_MALLOC;
#define ep_new(type) ((type*)ep_alloc(sizeof(type)))
@@ -87,9 +92,6 @@ gchar *ep_strconcat(const gchar *string, ...) G_GNUC_MALLOC G_GNUC_NULL_TERMINAT
*/
gchar** ep_strsplit(const gchar* string, const gchar* delimiter, int max_tokens);
-/** release all memory allocated in the previous packet dissection */
-void ep_free_all(void);
-
/** a stack implemented using ephemeral allocators */