diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-05-16 16:26:35 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-05-16 16:26:35 +0200 |
commit | 66b26c5c9b02e787bc46db24daff04ad41e05ec5 (patch) | |
tree | 01d0699b9f2e8023458be5ac25333cbde99b9ed9 /src/libsystemd-bus/bus-kernel.h | |
parent | 0a0c35d151570cca5ccd30befaa19c87b9c8c92d (diff) |
bus: send memfds as payload only on directed messages and for large parts
Diffstat (limited to 'src/libsystemd-bus/bus-kernel.h')
-rw-r--r-- | src/libsystemd-bus/bus-kernel.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/libsystemd-bus/bus-kernel.h b/src/libsystemd-bus/bus-kernel.h index ed3f987ccd..1651c1e41d 100644 --- a/src/libsystemd-bus/bus-kernel.h +++ b/src/libsystemd-bus/bus-kernel.h @@ -24,7 +24,14 @@ #include "sd-bus.h" #define MEMFD_CACHE_MAX 32 -#define MEMFD_CACHE_ITEM_SIZE_MAX (128*1024) + +/* When we cache a memfd block for reuse, we will truncate blocks + * longer than this in order not to keep too much data around. */ +#define MEMFD_CACHE_ITEM_SIZE_MAX (32*1024) + +/* This determines at which minimum size we prefer sending memfds over + * sending vectors */ +#define MEMFD_MIN_SIZE (32*1024) struct memfd_cache { int fd; |