From 500a2475190e594719039bbe5106d48afc3c96f4 Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Mon, 12 Oct 2009 01:38:43 +0000 Subject: Add some comments about GMemChunk usage; Enable 'deprecated' checking for some GLib functions Wireshark doesn't currently use. svn path=/trunk/; revision=30528 --- tools/checkAPIs.pl | 41 ++++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) (limited to 'tools') diff --git a/tools/checkAPIs.pl b/tools/checkAPIs.pl index 426c646b65..07744c8b23 100755 --- a/tools/checkAPIs.pl +++ b/tools/checkAPIs.pl @@ -152,29 +152,36 @@ my %APIs = ( 'g_win32_get_package_installation_directory', 'g_win32_get_package_installation_subdirectory', ## -## Deprecated as of GLib 2.10; to be replaced only when Wireshark requires GLib 2.10 or later -## 2.10 'g_allocator_free', # "use slice allocator" (avail since 2.10,2.14) -## 2.10 'g_allocator_new', # "use slice allocator" (avail since 2.10,2.14) -## 2.10 'g_blow_chunks', # "use slice allocator" (avail since 2.10,2.14) -## 2.10 'g_chunk_free', # g_slice_free (avail since 2.10) -## 2.10 'g_chunk_new', # g_slice_new (avail since 2.10) -## 2.10 'g_chunk_new0', # g_slice_new0 (avail since 2.10) -## 2.10 'g_list_pop_allocator', # "does nothing since 2.10" -## 2.10 'g_list_push_allocator', # "does nothing since 2.10" +## Following Deprecated as of GLib 2.10; to be replaced only when Wireshark requires GLib 2.10 or later +## Note: Only the commented out items are currently used by Wireshark + 'g_allocator_free', # "use slice allocator" (avail since 2.10,2.14) + 'g_allocator_new', # "use slice allocator" (avail since 2.10,2.14) + 'g_list_pop_allocator', # "does nothing since 2.10" + 'g_list_push_allocator', # "does nothing since 2.10" +### GMemChunks should used *only* with GLib < 2.10. +### There's an issue wherein GLib >= 2.10 g_mem_chunk_destroy doesn't actually free memory thus +### leading to memory leaks. +### So: either replace GMemChunk usage with something else altogether +### or use GMemChunks for GLib < 2.10 and GSlice (or whatever) for newer GLibs. ## 2.10 'g_mem_chunk_alloc', # "use slice allocator" (avail since 2.10) ## 2.10 'g_mem_chunk_alloc0', # "use slice allocator" (avail since 2.10) -## 2.10 'g_mem_chunk_clean', # "use slice allocator" (avail since 2.10) + 'g_mem_chunk_clean', # "use slice allocator" (avail since 2.10) ## 2.10 'g_mem_chunk_create', # "use slice allocator" (avail since 2.10) ## 2.10 'g_mem_chunk_destroy', # "use slice allocator" (avail since 2.10) ## 2.10 'g_mem_chunk_free', # "use slice allocator" (avail since 2.10) -## 2.10 'g_mem_chunk_info', # "use slice allocator" (avail since 2.10) + 'g_mem_chunk_info', # "use slice allocator" (avail since 2.10) ## 2.10 'g_mem_chunk_new', # "use slice allocator" (avail since 2.10) -## 2.10 'g_mem_chunk_print', # "use slice allocator" (avail since 2.10) -## 2.10 'g_mem_chunk_reset', # "use slice allocator" (avail since 2.10) -## 2.10 'g_node_pop_allocator', # "does nothing since 2.10" -## 2.10 'g_node_push_allocator', # "does nothing since 2.10" -## 2.10 'g_slist_pop_allocator', # "does nothing since 2.10" -## 2.10 'g_slist_push_allocator', # "does nothing since 2.10" + 'g_mem_chunk_print', # "use slice allocator" (avail since 2.10) + 'g_mem_chunk_reset', # "use slice allocator" (avail since 2.10) + 'g_blow_chunks', # "use slice allocator" (avail since 2.10,2.14) +## 2.10 'g_chunk_free', # g_slice_free (avail since 2.10) +## 2.10 'g_chunk_new', # g_slice_new (avail since 2.10) + 'g_chunk_new0', # g_slice_new0 (avail since 2.10) +### + 'g_node_pop_allocator', # "does nothing since 2.10" + 'g_node_push_allocator', # "does nothing since 2.10" + 'g_slist_pop_allocator', # "does nothing since 2.10" + 'g_slist_push_allocator', # "does nothing since 2.10" ] }, # APIs that make the program exit. Dissectors shouldn't call these -- cgit v1.2.3