aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/README.wmem12
-rw-r--r--epan/epan.c2
-rw-r--r--epan/wmem/wmem_allocator_block.c6
-rw-r--r--epan/wmem/wmem_allocator_block.h2
-rw-r--r--epan/wmem/wmem_allocator_glib.c6
-rw-r--r--epan/wmem/wmem_allocator_glib.h2
-rw-r--r--epan/wmem/wmem_scopes.c8
-rw-r--r--epan/wmem/wmem_slab.c2
-rw-r--r--epan/wmem/wmem_slab.h2
-rw-r--r--epan/wmem/wmem_stack.c4
-rw-r--r--epan/wmem/wmem_stack.h2
11 files changed, 24 insertions, 24 deletions
diff --git a/doc/README.wmem b/doc/README.wmem
index d33bea1d71..d7381ac647 100644
--- a/doc/README.wmem
+++ b/doc/README.wmem
@@ -87,7 +87,7 @@ to the lifetime of the pinfo struct.
2.4 Stack
- - wmem_create_stack
+ - wmem_stack_new
- wmem_stack_push
- wmem_stack_pop
- wmem_stack_peek
@@ -95,7 +95,7 @@ to the lifetime of the pinfo struct.
2.5 Slab
- - wmem_create_slab
+ - wmem_slab_new
- wmem_slab_alloc
- wmem_slab_free
@@ -123,12 +123,12 @@ The currently available allocators are:
3.2 Creating a Pool
To create a pool, include the header for the type of allocator you want to use
-and call the create function available in that header. For example,
+and call the 'new' function available in that header. For example,
#include "wmem/wmem_allocator_glib.h"
wmem_allocator_t *myPool;
- myPool = wmem_create_glib_allocator();
+ myPool = wmem_glib_allocator_new();
From here on in, you don't need to remember which type of allocator you used
(although allocator authors are welcome to expose additional allocator-specific
@@ -149,7 +149,7 @@ with a call to the function wmem_destroy_allocator(). For example:
wmem_allocator_t *myPool;
- myPool = wmem_create_glib_allocator();
+ myPool = wmem_glib_allocator_new();
/* Allocate some memory in myPool ... */
@@ -170,7 +170,7 @@ the pool would otherwise be scoped to a single iteration of a loop. For example:
wmem_allocator_t *myPool;
- myPool = wmem_create_glib_allocator();
+ myPool = wmem_glib_allocator_new();
for (...) {
/* Allocate some memory in myPool ... */
diff --git a/epan/epan.c b/epan/epan.c
index 12ca7b5988..86a65443f7 100644
--- a/epan/epan.c
+++ b/epan/epan.c
@@ -162,7 +162,7 @@ epan_dissect_init(epan_dissect_t *edt, const gboolean create_proto_tree, const g
{
g_assert(edt);
- edt->pi.pool = wmem_create_glib_allocator();
+ edt->pi.pool = wmem_glib_allocator_new();
if (create_proto_tree) {
edt->tree = proto_tree_create_root(&edt->pi);
diff --git a/epan/wmem/wmem_allocator_block.c b/epan/wmem/wmem_allocator_block.c
index df515165c6..e477b5e176 100644
--- a/epan/wmem/wmem_allocator_block.c
+++ b/epan/wmem/wmem_allocator_block.c
@@ -150,7 +150,7 @@ wmem_block_free_all(void *private_data)
}
static void
-wmem_destroy_block_allocator(wmem_allocator_t *allocator)
+wmem_block_allocator_destroy(wmem_allocator_t *allocator)
{
GSList *tmp;
wmem_block_allocator_t *real_allocator;
@@ -173,7 +173,7 @@ wmem_destroy_block_allocator(wmem_allocator_t *allocator)
}
wmem_allocator_t *
-wmem_create_block_allocator(void)
+wmem_block_allocator_new(void)
{
wmem_allocator_t *allocator;
wmem_block_allocator_t *block_allocator;
@@ -183,7 +183,7 @@ wmem_create_block_allocator(void)
allocator->alloc = &wmem_block_alloc;
allocator->free_all = &wmem_block_free_all;
- allocator->destroy = &wmem_destroy_block_allocator;
+ allocator->destroy = &wmem_block_allocator_destroy;
allocator->private_data = (void*) block_allocator;
block_allocator->free_list = NULL;
diff --git a/epan/wmem/wmem_allocator_block.h b/epan/wmem/wmem_allocator_block.h
index da14d267e2..fafe85af3a 100644
--- a/epan/wmem/wmem_allocator_block.h
+++ b/epan/wmem/wmem_allocator_block.h
@@ -33,7 +33,7 @@ extern "C" {
#endif /* __cplusplus */
wmem_allocator_t *
-wmem_create_block_allocator(void);
+wmem_block_allocator_new(void);
#ifdef __cplusplus
}
diff --git a/epan/wmem/wmem_allocator_glib.c b/epan/wmem/wmem_allocator_glib.c
index 600f1849c8..ef924d80b5 100644
--- a/epan/wmem/wmem_allocator_glib.c
+++ b/epan/wmem/wmem_allocator_glib.c
@@ -69,14 +69,14 @@ wmem_glib_free_all(void *private_data)
}
static void
-wmem_destroy_glib_allocator(wmem_allocator_t *allocator)
+wmem_glib_allocator_destroy(wmem_allocator_t *allocator)
{
g_free(allocator->private_data);
g_free(allocator);
}
wmem_allocator_t *
-wmem_create_glib_allocator(void)
+wmem_glib_allocator_new(void)
{
wmem_allocator_t *allocator;
wmem_glib_allocator_t *glib_allocator;
@@ -86,7 +86,7 @@ wmem_create_glib_allocator(void)
allocator->alloc = &wmem_glib_alloc;
allocator->free_all = &wmem_glib_free_all;
- allocator->destroy = &wmem_destroy_glib_allocator;
+ allocator->destroy = &wmem_glib_allocator_destroy;
allocator->private_data = (void*) glib_allocator;
glib_allocator->block_list = NULL;
diff --git a/epan/wmem/wmem_allocator_glib.h b/epan/wmem/wmem_allocator_glib.h
index 7f61cbacfa..62cf934115 100644
--- a/epan/wmem/wmem_allocator_glib.h
+++ b/epan/wmem/wmem_allocator_glib.h
@@ -33,7 +33,7 @@ extern "C" {
#endif /* __cplusplus */
wmem_allocator_t *
-wmem_create_glib_allocator(void);
+wmem_glib_allocator_new(void);
#ifdef __cplusplus
}
diff --git a/epan/wmem/wmem_scopes.c b/epan/wmem/wmem_scopes.c
index 64ede1ae8c..88e6028d32 100644
--- a/epan/wmem/wmem_scopes.c
+++ b/epan/wmem/wmem_scopes.c
@@ -154,14 +154,14 @@ wmem_init_scopes(void)
g_assert(in_file_scope == FALSE);
if (getenv("WIRESHARK_DEBUG_WMEM_PACKET_NO_CHUNKS")) {
- packet_scope = wmem_create_glib_allocator();
+ packet_scope = wmem_glib_allocator_new();
}
else {
- packet_scope = wmem_create_block_allocator();
+ packet_scope = wmem_block_allocator_new();
}
- file_scope = wmem_create_glib_allocator();
- epan_scope = wmem_create_glib_allocator();
+ file_scope = wmem_glib_allocator_new();
+ epan_scope = wmem_glib_allocator_new();
}
void
diff --git a/epan/wmem/wmem_slab.c b/epan/wmem/wmem_slab.c
index 82ae944eea..9a32d80a40 100644
--- a/epan/wmem/wmem_slab.c
+++ b/epan/wmem/wmem_slab.c
@@ -89,7 +89,7 @@ wmem_slab_free(wmem_slab_t *slab, void *object)
}
wmem_slab_t *
-wmem_create_slab(wmem_allocator_t *allocator, const size_t chunk_size)
+wmem_slab_new(wmem_allocator_t *allocator, const size_t chunk_size)
{
wmem_slab_t *slab;
diff --git a/epan/wmem/wmem_slab.h b/epan/wmem/wmem_slab.h
index 658bf9ad09..4e38ab4c97 100644
--- a/epan/wmem/wmem_slab.h
+++ b/epan/wmem/wmem_slab.h
@@ -45,7 +45,7 @@ void
wmem_slab_free(wmem_slab_t *slab, void *object);
wmem_slab_t *
-wmem_create_slab(wmem_allocator_t *allocator, const size_t chunk_size);
+wmem_slab_new(wmem_allocator_t *allocator, const size_t chunk_size);
#ifdef __cplusplus
}
diff --git a/epan/wmem/wmem_stack.c b/epan/wmem/wmem_stack.c
index 89302edc5c..8581f51d2c 100644
--- a/epan/wmem/wmem_stack.c
+++ b/epan/wmem/wmem_stack.c
@@ -88,7 +88,7 @@ wmem_stack_push(wmem_stack_t *stack, void *data)
}
wmem_stack_t *
-wmem_create_stack(wmem_allocator_t *allocator)
+wmem_stack_new(wmem_allocator_t *allocator)
{
wmem_stack_t *stack;
@@ -96,7 +96,7 @@ wmem_create_stack(wmem_allocator_t *allocator)
stack->count = 0;
stack->top = NULL;
- stack->slab = wmem_create_slab(allocator, sizeof(wmem_stack_frame_t));
+ stack->slab = wmem_slab_new(allocator, sizeof(wmem_stack_frame_t));
return stack;
}
diff --git a/epan/wmem/wmem_stack.h b/epan/wmem/wmem_stack.h
index 0638ba7cc2..42ed4f3295 100644
--- a/epan/wmem/wmem_stack.h
+++ b/epan/wmem/wmem_stack.h
@@ -52,7 +52,7 @@ void
wmem_stack_push(wmem_stack_t *stack, void *data);
wmem_stack_t *
-wmem_create_stack(wmem_allocator_t *allocator);
+wmem_stack_new(wmem_allocator_t *allocator);
#ifdef __cplusplus
}