aboutsummaryrefslogtreecommitdiffstats
path: root/tools/checkAPIs.pl
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2009-10-12 01:38:43 +0000
committerBill Meier <wmeier@newsguy.com>2009-10-12 01:38:43 +0000
commit500a2475190e594719039bbe5106d48afc3c96f4 (patch)
treea86c8e7b77a1a187bf7acb2b273bc464218fb481 /tools/checkAPIs.pl
parentadc374c9034a03f8ffd333a72852e12bc9b3a4b6 (diff)
Add some comments about GMemChunk usage;
Enable 'deprecated' checking for some GLib functions Wireshark doesn't currently use. svn path=/trunk/; revision=30528
Diffstat (limited to 'tools/checkAPIs.pl')
-rwxr-xr-xtools/checkAPIs.pl41
1 files changed, 24 insertions, 17 deletions
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