#define KDBUS_ITEM_HEADER_SIZE offsetof(struct kdbus_item, data)
#define KDBUS_ITEM_SIZE(s) ALIGN8((s) + KDBUS_ITEM_HEADER_SIZE)
-#define KDBUS_POOL_SIZE (4*1024*1024)
-
static int parse_unique_name(const char *s, uint64_t *id) {
int r;
* sending vectors */
#define MEMFD_MIN_SIZE (32*1024)
+/* The size of the per-connection memory pool that we set up and where
+ * the kernel places our incoming messages */
+#define KDBUS_POOL_SIZE (16*1024*1024)
+
struct memfd_cache {
int fd;
void *address;
#include <netdb.h>
#include <sys/poll.h>
#include <byteswap.h>
+#include <sys/mman.h>
#include "util.h"
#include "macro.h"
bus_close_fds(b);
+ if (b->kdbus_buffer)
+ munmap(b->kdbus_buffer, KDBUS_POOL_SIZE);
+
free(b->rbuffer);
free(b->unique_name);
free(b->auth_buffer);