summaryrefslogtreecommitdiff
path: root/src/shared/hashmap.c
Commit message (Collapse)AuthorAge
* use memzero(foo, length); for all memset(foo, 0, length); callsGreg KH2014-01-31
| | | | | | | | In trying to track down a stupid linker bug, I noticed a bunch of memset() calls that should be using memzero() to make it more "obvious" that the options are correct (i.e. 0 is not the length, but the data to set). So fix up all current calls to memset(foo, 0, length) to memzero(foo, length).
* shared: switch our hash table implementation over to SipHashLennart Poettering2013-12-22
| | | | | SipHash appears to be the new gold standard for hashing smaller strings for hashtables these days, so let's make use of it.
* hashmap: make gcc shut up on old glibcs that lack getauxval()Lennart Poettering2013-12-10
|
* hashmap: be a bit more conservative with pre-allocating hash tables and itemsLennart Poettering2013-11-20
|
* hashmap: randomize hash functions a bitLennart Poettering2013-10-01
|
* hashmap: size hashmap bucket array dynamicallyLennart Poettering2013-10-01
| | | | | | | | | | 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).
* hashmap: remove empty linesKay Sievers2013-08-15
|
* binfmt,tmpfiles,modules-load,sysctl: rework the various early-boot services ↵Lennart Poettering2013-02-11
| | | | | | | | | | | | | | | | | | | that work on .d/ directories This unifies much of the logic behind them: - All four will now ofllow the rule that the earlier file and earlier assignment in the .d/ directories wins. Before, sysctl was the only outlier, where the later setting always won. - All four now support getopt() and --help on the command line. - All four can now handle specification of configuration file names on the command line to apply. The tools will automatically find them, and apply them. Previously only tmpfiles could do that. This is useful for %post scripts in RPMs and suchlike. - This fixes various error path issues in conf_files_list()
* build-sys: use VALGRIND not __OPTIMIZE__ as condition for valgrind compatZbigniew Jędrzejewski-Szmek2013-01-06
| | | | | | Actually, one might want to run valgrind even on optimized code. Now the same check is used in the jenkins hash functions and hashtable.
* journal: introduce entry array chain cacheLennart Poettering2012-10-26
| | | | | | | | | | | | When traversing entry array chains for a bisection or for retrieving an item by index we previously always started at the beginning of the chain. Since we tend to look at the same chains repeatedly, let's cache where we have been the last time, and maybe we can skip ahead with this the next time. This turns most bisections and index lookups from O(log(n)*log(n)) into O(log(n)). More importantly however, we seek around on disk much less, which is good to reduce buffer cache and seek times on rotational disks.
* journal: properly serialize fields with multiple values into JSONLennart Poettering2012-10-25
| | | | | | This now matches the JSON serialization spec from: http://www.freedesktop.org/wiki/Software/systemd/json
* journal: add ability to list values a specified field can take in all ↵Lennart Poettering2012-10-18
| | | | | | | | | | | | | | | | | entries of the journal The new 'unique' API allows listing all unique field values that a field specified by a field name can take in all entries of the journal. This allows answering queries such as "What units logged to the journal?", "What hosts have logged into the journal?", "Which boot IDs have logged into the journal?". Ultimately this allows implementation of tools similar to lastlog based on journal data. Note that listing these field values will not work for journal files created with older journald, as the field values are not indexed in older files.
* systemctl: show unit name when a job failsLennart Poettering2012-09-14
| | | | | https://bugzilla.redhat.com/show_bug.cgi?id=845028 https://bugzilla.redhat.com/show_bug.cgi?id=846483
* hashmap: hashmap_contains does not need hashmap_entryLukas Nykryn2012-08-23
|
* service: add options RestartPreventExitStatus and SuccessExitStatusLukas Nykryn2012-08-14
| | | | | | | | | In some cases, like wrong configuration, restarting after error does not help, so administrator can specify statuses by RestartPreventExitStatus which will not cause restart of a service. Sometimes you have non-standart exit status, so this can be specified by SuccessfulExitStatus.
* hashmap: make hashmap_clear() work on NULL hashmapsLennart Poettering2012-07-03
|
* load-fragment: a few modernizationsLennart Poettering2012-07-03
|
* relicense to LGPLv2.1 (with exceptions)Lennart Poettering2012-04-12
| | | | | | | | | | | | | | We finally got the OK from all contributors with non-trivial commits to relicense systemd from GPL2+ to LGPL2.1+. Some udev bits continue to be GPL2+ for now, but we are looking into relicensing them too, to allow free copy/paste of all code within systemd. The bits that used to be MIT continue to be MIT. The big benefit of the relicensing is that closed source code may now link against libsystemd-login.so and friends.
* util: move all to shared/ and split external dependencies in separate ↵Kay Sievers2012-04-10
internal libraries Before: $ ldd /lib/systemd/systemd-timestamp linux-vdso.so.1 => (0x00007fffb05ff000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f90aac57000) libcap.so.2 => /lib64/libcap.so.2 (0x00007f90aaa53000) librt.so.1 => /lib64/librt.so.1 (0x00007f90aa84a000) libc.so.6 => /lib64/libc.so.6 (0x00007f90aa494000) /lib64/ld-linux-x86-64.so.2 (0x00007f90aae90000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f90aa290000) libattr.so.1 => /lib64/libattr.so.1 (0x00007f90aa08a000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f90a9e6e000) After: $ ldd systemd-timestamp linux-vdso.so.1 => (0x00007fff3cbff000) libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f5eaa1c3000) librt.so.1 => /lib64/librt.so.1 (0x00007f5ea9fbb000) libc.so.6 => /lib64/libc.so.6 (0x00007f5ea9c04000) /lib64/ld-linux-x86-64.so.2 (0x00007f5eaa3fc000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f5ea9a00000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f5ea97e4000)