#
c33667d4 |
|
01-Feb-2009 |
Michael Lotz <mmlr@mlotz.ch> |
Fixing warnings under GCC4 in preparation to enable -Werror there as well: * Replaced the use of offsetof() for structs that aren't PODs. Add a offset_of_member() macro to util/khash.h because that's what it's used for in our cases. * Change the signature of add_debugger_command()/remove_debugger_command() on GCC > 2 to avoid the depricated conversion from string constants to char *. * Adding some "suggested" parenthesis. I know that not everyone likes that, but it pointed out at least one bug that is fixed here as well. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29113 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
65a9d40a |
|
22-Sep-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added hash_dump_table() function, dumping the whole table. * Fixed hash_remove_current(): It didn't update "lastElement" and thus always also removed all elements in the same bucket preceding the one to be removed. Also got rid of the useless "for" loop. Fixes #2757. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27689 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4a67038e |
|
21-Jan-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Added a new function hash_insert_grow() that grows the hash table when needed. * Removed the public hash_grow() function again (at least for now, it's only private). * Removed the newSize argument from hash_grow(); it will compute the new size automatically. * The block cache is now using hash_insert_grow() instead of hash_insert() which should make hash lookups much faster with some 10 thousand blocks, also increased the initial table size from 32 to 1024... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23692 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
dfa4dfe0 |
|
06-Dec-2007 |
Michael Lotz <mmlr@mlotz.ch> |
Something else that has been laying around for some time. Implemented hash_grow() that can grow a hash table to a new table size. Automatic growing is commented out in hash_insert() since there needs to be a way to disallow growing in certain cases (i.e. where no allocations can be made). This is detailed in the ToDo at the top of the file. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23074 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
40c3aedf |
|
09-Sep-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added hash_count_elements() and hash_count_used_slots() (mainly for diagnostic purposes). * hash_init() adjusts the table size to a prime number, which should result in a better element distribution, particularly since usually a power of two is passed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22210 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
826e857c |
|
11-Mar-2007 |
Axel Dörfler <axeld@pinc-software.de> |
Implemented hash_remove_current() which removes the current iterator position from the hash - not yet tested. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20368 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
52fe8bf7 |
|
18-Mar-2005 |
Axel Dörfler <axeld@pinc-software.de> |
Minor header cleanup: moved some headers to better matching directories, removed unused headers. Adapted sources to still compile with the new header locations. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11913 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
c33667d400856680a8e0122300861eda77d1847a |
|
01-Feb-2009 |
Michael Lotz <mmlr@mlotz.ch> |
Fixing warnings under GCC4 in preparation to enable -Werror there as well: * Replaced the use of offsetof() for structs that aren't PODs. Add a offset_of_member() macro to util/khash.h because that's what it's used for in our cases. * Change the signature of add_debugger_command()/remove_debugger_command() on GCC > 2 to avoid the depricated conversion from string constants to char *. * Adding some "suggested" parenthesis. I know that not everyone likes that, but it pointed out at least one bug that is fixed here as well. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29113 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
65a9d40a9d22212639ccdc9c3b4720e0a65746c6 |
|
22-Sep-2008 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added hash_dump_table() function, dumping the whole table. * Fixed hash_remove_current(): It didn't update "lastElement" and thus always also removed all elements in the same bucket preceding the one to be removed. Also got rid of the useless "for" loop. Fixes #2757. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27689 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
4a67038e563385e8fffd2d0ea76f200c47c772aa |
|
21-Jan-2008 |
Axel Dörfler <axeld@pinc-software.de> |
* Added a new function hash_insert_grow() that grows the hash table when needed. * Removed the public hash_grow() function again (at least for now, it's only private). * Removed the newSize argument from hash_grow(); it will compute the new size automatically. * The block cache is now using hash_insert_grow() instead of hash_insert() which should make hash lookups much faster with some 10 thousand blocks, also increased the initial table size from 32 to 1024... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23692 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
dfa4dfe0333cebefc8dc87e3575082a3383ac9cf |
|
06-Dec-2007 |
Michael Lotz <mmlr@mlotz.ch> |
Something else that has been laying around for some time. Implemented hash_grow() that can grow a hash table to a new table size. Automatic growing is commented out in hash_insert() since there needs to be a way to disallow growing in certain cases (i.e. where no allocations can be made). This is detailed in the ToDo at the top of the file. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23074 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
40c3aedf8d221b0f8b9c34aef27bcbce199bc3ff |
|
09-Sep-2007 |
Ingo Weinhold <ingo_weinhold@gmx.de> |
* Added hash_count_elements() and hash_count_used_slots() (mainly for diagnostic purposes). * hash_init() adjusts the table size to a prime number, which should result in a better element distribution, particularly since usually a power of two is passed. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22210 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
826e857cf0d3aa43817ed7b8fcf3c3b267d54940 |
|
11-Mar-2007 |
Axel Dörfler <axeld@pinc-software.de> |
Implemented hash_remove_current() which removes the current iterator position from the hash - not yet tested. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20368 a95241bf-73f2-0310-859d-f6bbb57e9c96
|
#
52fe8bf7a88e5cc78b1a5340545987fa483af990 |
|
18-Mar-2005 |
Axel Dörfler <axeld@pinc-software.de> |
Minor header cleanup: moved some headers to better matching directories, removed unused headers. Adapted sources to still compile with the new header locations. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11913 a95241bf-73f2-0310-859d-f6bbb57e9c96
|