From 59702234b9bb5fed0ee62294613db8780af5a5a0 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 18 Jan 2015 14:16:55 -0800 Subject: Put back ep_alloc0(), accidentally deleted in the removal of the se_ stuff. (The se_ stuff wasn't as contiguous as I thought.) Also fix some comments to no longer refer to #defines for se_ stuff. Change-Id: Ibc53e6f0f135bee9795f98550d5242e8e58afb16 Reviewed-on: https://code.wireshark.org/review/6641 Reviewed-by: Guy Harris --- epan/emem.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'epan/emem.c') diff --git a/epan/emem.c b/epan/emem.c index ea68027c5c..c0332b1434 100644 --- a/epan/emem.c +++ b/epan/emem.c @@ -133,7 +133,6 @@ typedef struct _emem_pool_t { * object individually. * * WIRESHARK_DEBUG_EP_NO_CHUNKS - * WIRESHARK_DEBUG_SE_NO_CHUNKS */ gboolean debug_use_chunks; @@ -141,17 +140,13 @@ typedef struct _emem_pool_t { * Export the following environment variables to disable/enable canaries * * WIRESHARK_DEBUG_EP_NO_CANARY - * For SE memory use of canary is default off as the memory overhead - * is considerable. - * WIRESHARK_DEBUG_SE_USE_CANARY */ gboolean debug_use_canary; /* Do we want to verify no one is using a pointer to an ep_ * allocated thing where they shouldn't be? * - * Export WIRESHARK_EP_VERIFY_POINTERS or WIRESHARK_SE_VERIFY_POINTERS - * to turn this on. + * Export WIRESHARK_EP_VERIFY_POINTERS to turn this on. */ gboolean debug_verify_pointers; @@ -689,6 +684,12 @@ ep_alloc(size_t size) return emem_alloc(size, &ep_packet_mem); } +void * +ep_alloc0(size_t size) +{ + return memset(ep_alloc(size),'\0',size); +} + static gchar * emem_strdup(const gchar *src, void *allocator(size_t)) { -- cgit v1.2.3