]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/tty-ask-password-agent/tty-ask-password-agent.c
shared/exit-status: use Bitmap instead of Sets
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 28 Jul 2019 09:14:46 +0000 (11:14 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 29 Jul 2019 13:54:53 +0000 (15:54 +0200)
commit23d5dd168724fe60c7b00d78f49563a6be05627d
tree3bd28cf74b34f04e0cc6f355c859fff36c63e186
parent8594c8a552c02fb6fa2bf569e68aa73b739e8da6
shared/exit-status: use Bitmap instead of Sets

I opted to embed the Bitmap structure directly in the ExitStatusSet.
This means that memory usage is a bit higher for units which don't define
this setting:

Service changes:
        /* size: 2720, cachelines: 43, members: 73 */
        /* sum members: 2680, holes: 9, sum holes: 39 */
        /* sum bitfield members: 7 bits, bit holes: 1, sum bit holes: 1 bits */
        /* last cacheline: 32 bytes */

        /* size: 2816, cachelines: 44, members: 73 */
        /* sum members: 2776, holes: 9, sum holes: 39 */
        /* sum bitfield members: 7 bits, bit holes: 1, sum bit holes: 1 bits */

But this way the code is simpler and we do less pointer chasing.
src/core/dbus-service.c
src/core/load-fragment.c
src/shared/bitmap.c
src/shared/bitmap.h
src/shared/exit-status.c
src/shared/exit-status.h
src/tty-ask-password-agent/tty-ask-password-agent.c