aboutsummaryrefslogtreecommitdiff
path: root/include/pub_tool_hashtable.h
diff options
context:
space:
mode:
authorphilippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9>2012-01-17 21:16:30 +0000
committerphilippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9>2012-01-17 21:16:30 +0000
commit6643e96a72e8530a7c8830c02ffb2fb4aee74c88 (patch)
treed9b5cde93ca593e5f4fc60a9b908ad87dd930036 /include/pub_tool_hashtable.h
parentfdfca22bda4e8b711ea9d95f764a689864b19c71 (diff)
downloadvalgrind-6643e96a72e8530a7c8830c02ffb2fb4aee74c88.tar.gz
Fixes 282230 group allocator for small fixed size, use it for MC_Chunk/SEc vbit
* new files include/pub_tool_groupalloc.h and coregrind/m_groupalloc.c implementing a group allocator (based on helgrind group alloc). * include/Makefile.am coregrind/Makefile.am : added pub_tool_groupalloc.h and m_groupalloc.c * helgrind/libhb_core.c : use pub_tool_groupalloc.h/m_groupalloc.c instead of the local implementation. * include/pub_tool_oset.h coregrind/m_oset.c : new function allowing to create an oset that will use a pool allocator. new function allowing to clone an oset (so as to share the pool alloc) * memcheck/tests/unit_oset.c drd/tests/unit_bitmap.c : modified so that it compiles with the new m_oset.c * memcheck/mc_main.c : use group alloc for MC_Chunk memcheck/mc_include.h : declare the MC_Chunk group alloc * memcheck/mc_main.c : use group alloc for the nodes of the secVBitTable OSet * include/pub_tool_hashtable.h coregrind/m_hashtable.c : pass the free node function in the VG_(HT_destruct). (needed as the hashtable user can allocate a node with its own alloc, the hash table destroy must be able to free the nodes with the user own free). * coregrind/m_gdbserver/m_gdbserver.c : pass free function to VG_(HT_destruct) * memcheck/mc_replace_strmem.c memcheck/mc_machine.c memcheck/mc_malloc_wrappers.c memcheck/mc_leakcheck.c memcheck/mc_errors.c memcheck/mc_translate.c : new include needed due to group alloc. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12341 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'include/pub_tool_hashtable.h')
-rw-r--r--include/pub_tool_hashtable.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/pub_tool_hashtable.h b/include/pub_tool_hashtable.h
index d2a0d4a74..2cd631047 100644
--- a/include/pub_tool_hashtable.h
+++ b/include/pub_tool_hashtable.h
@@ -90,8 +90,9 @@ extern void VG_(HT_ResetIter) ( VgHashTable table );
assurance. */
extern void* VG_(HT_Next) ( VgHashTable table );
-/* Destroy a table. */
-extern void VG_(HT_destruct) ( VgHashTable t );
+/* Destroy a table and deallocates the memory used by the nodes using
+ freenode_fn.*/
+extern void VG_(HT_destruct) ( VgHashTable t, void(*freenode_fn)(void*) );
#endif // __PUB_TOOL_HASHTABLE_H