chiark / gitweb /
tree-wide: remove Lennart's copyright lines
[elogind.git] / src / libelogind / sd-bus / bus-kernel.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #pragma once
3
4 /***
5 ***/
6
7 #include "sd-bus.h"
8
9 #define MEMFD_CACHE_MAX 32
10
11 /* When we cache a memfd block for reuse, we will truncate blocks
12  * longer than this in order not to keep too much data around. */
13 #define MEMFD_CACHE_ITEM_SIZE_MAX (128*1024)
14
15 /* This determines at which minimum size we prefer sending memfds over
16  * sending vectors */
17 #define MEMFD_MIN_SIZE (512*1024)
18
19 struct memfd_cache {
20         int fd;
21         void *address;
22         size_t mapped;
23         size_t allocated;
24 };
25
26 #if 0 /// UNNEEDED by elogind
27 #endif // 0
28 void close_and_munmap(int fd, void *address, size_t size);
29 void bus_flush_memfd(sd_bus *bus);
30 #if 0 /// UNNEEDED by elogind
31 #endif // 0