chiark / gitweb /
bus: reduce calls to KDBUS_CMD_MEMFD_SIZE_SET ioctl
authorLennart Poettering <lennart@poettering.net>
Wed, 18 Dec 2013 17:46:23 +0000 (18:46 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 18 Dec 2013 18:04:14 +0000 (19:04 +0100)
commit8e959fbf3862172b53d200cda659795c3744fa78
treeaf7f63d5b925d321ee2aac5afbbdf55af786e9eb
parente7d43b3cc30764138c90eaaf95d3d8f49e448890
bus: reduce calls to KDBUS_CMD_MEMFD_SIZE_SET ioctl

Instead of calling it for each buffer append, increase allocation
exponentially and set the real value only at the end, when sealing off
the memfd.

This should drastically reduce the number of times we invoke the
ioctl().
src/libsystemd-bus/bus-kernel.c
src/libsystemd-bus/bus-kernel.h
src/libsystemd-bus/bus-message.c
src/libsystemd-bus/bus-message.h