summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-message.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-18 18:46:23 +0100
committerLennart Poettering <lennart@poettering.net>2013-12-18 19:04:14 +0100
commit8e959fbf3862172b53d200cda659795c3744fa78 (patch)
treeaf7f63d5b925d321ee2aac5afbbdf55af786e9eb /src/libsystemd-bus/bus-message.h
parente7d43b3cc30764138c90eaaf95d3d8f49e448890 (diff)
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().
Diffstat (limited to 'src/libsystemd-bus/bus-message.h')
-rw-r--r--src/libsystemd-bus/bus-message.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-message.h b/src/libsystemd-bus/bus-message.h
index a9d42c345a..cd1fb0e546 100644
--- a/src/libsystemd-bus/bus-message.h
+++ b/src/libsystemd-bus/bus-message.h
@@ -65,6 +65,7 @@ struct bus_body_part {
void *data;
size_t size;
size_t mapped;
+ size_t allocated;
int memfd;
bool free_this:1;
bool munmap_this:1;