]> git.ipfire.org Git - thirdparty/systemd.git/commit
manager: free the jobs hashmap after we have no jobs 15954/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 28 May 2020 16:39:27 +0000 (18:39 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 28 May 2020 16:54:20 +0000 (18:54 +0200)
commita4ac27c1af5fa055a7c71729f71dce0b16cf5385
treec1101dce6636a54f4c514c2dd3c5013934349565
parentf6173cb955e85c485a2005f02651004d36c1fb57
manager: free the jobs hashmap after we have no jobs

After a larger transaction, e.g. after bootup, we're left with an empty hashmap
with hundreds of buckets. Long-term, it'd be better to size hashmaps down when
they are less than 1/4 full, but even if we implement that, jobs hashmap is
likely to be empty almost always, so it seems useful to deallocate it once the
jobs count reaches 0.
src/core/job.c
src/core/manager.c
src/core/transaction.c