From 632b6ee0eae207850ab34a7dbb80de37410617d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sat, 2 Nov 2019 00:23:23 +0100 Subject: [PATCH] shm: add debug logging of how large the allocated memory buffer is --- shm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/shm.c b/shm.c index 607492ac..1b2c9d7c 100644 --- a/shm.c +++ b/shm.c @@ -10,6 +10,7 @@ #include #define LOG_MODULE "shm" +#define LOG_ENABLE_DBG 1 #include "log.h" #include "stride.h" #include "tllist.h" @@ -74,6 +75,8 @@ shm_get_buffer(struct wl_shm *shm, int width, int height, size_t copies) /* Total size */ size = stride * height; + LOG_DBG("allocating a %zu KB pool", size / 1024); + if (ftruncate(pool_fd, size) == -1) { LOG_ERRNO("failed to truncate SHM pool"); goto err;