1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 02:57:16 +03:00
Commit Graph

4 Commits

Author SHA1 Message Date
Ronny Chevalier
d06b3a9d70 tests: add tests to test-hashmap
add tests for:
  - hashmap_remove_and_put
  - hashmap_first_key
  - hashmap_last
  - hashmap_steal_first_key
  - hashmap_clear_free_free
2014-06-16 20:38:22 +02:00
Lennart Poettering
45fa9e29f8 hashmap: size hashmap bucket array dynamically
Instead of fixing the hashmap bucket array to 127 entries dynamically
size it, starting with a smaller one of 31. As soon as a fill level of
75% is reached, quadruple the size, and so on.

This should siginficantly optimize the lookup time in large tables
(from O(n) back to O(1)), and save memory on smaller tables (which most
are).
2013-10-01 00:17:21 +02:00
Zbigniew Jędrzejewski-Szmek
8097ab4f0c test-hashmap: fix access to uninitialized memory 2013-09-26 11:12:03 +02:00
Daniel Buch
9341a4a167 test-hashmap.c: add unit-test for hashmap 2013-05-03 00:19:51 +02:00