summaryrefslogtreecommitdiff
path: root/epan/ftypes/ftypes.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-03-09 20:02:19 +0000
committerEvan Huus <eapache@gmail.com>2013-03-09 20:02:19 +0000
commit122b7cb6dfabd71a987216cf2fee907e8281dbd0 (patch)
tree9eca4481493ae05602a5d065e19f1c9daf8a427b /epan/ftypes/ftypes.c
parentdeefa092378d5042c9f12edf1cd70563fa7d22b3 (diff)
downloadwireshark-122b7cb6dfabd71a987216cf2fee907e8281dbd0.tar.gz
Remove the emem slab feature (sl_* functions) completely, replacing it with
glib memory slices. - We weren't doing anything with the emem slab that couldn't be done with glib slices. - Removes a fair bit of code as well as one debugging environment variable. - Glib slices are much cache-friendlier and are multi-threading friendly (if we ever go there). - Allows glib to actually return slices to the OS on occasion. The emem slab would hold onto its memory forever which resulted in a great deal of wasted memory after closing a large file. svn path=/trunk/; revision=48218
Diffstat (limited to 'epan/ftypes/ftypes.c')
-rw-r--r--epan/ftypes/ftypes.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/epan/ftypes/ftypes.c b/epan/ftypes/ftypes.c
index 2a598f84bd..a8c7d127bf 100644
--- a/epan/ftypes/ftypes.c
+++ b/epan/ftypes/ftypes.c
@@ -31,10 +31,6 @@
/* Keep track of ftype_t's via their ftenum number */
static ftype_t* type_list[FT_NUM_TYPES];
-/* Space for quickly allocating/de-allocating fvalue_t's */
-struct ws_memory_slab fvalue_t_slab =
- WS_MEMORY_SLAB_INIT(fvalue_t, 128);
-
/* Initialize the ftype module. */
void
ftypes_initialize(void)
@@ -203,7 +199,7 @@ fvalue_new(ftenum_t ftype)
ftype_t *ft;
FvalueNewFunc new_value;
- fv = (fvalue_t *)sl_alloc(&fvalue_t_slab);
+ fv = g_slice_new(fvalue_t);
FTYPE_LOOKUP(ftype, ft);
fv->ftype = ft;