diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-11-01 23:23:23 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-11-01 23:23:23 +0000 |
| commit | 632b6ee0eae207850ab34a7dbb80de37410617d0 (patch) | |
| tree | edf499d9b74580c4653b20aa8254577b2a279e91 | |
| parent | shm: fix name of memfd (diff) | |
shm: add debug logging of how large the allocated memory buffer is
| -rw-r--r-- | shm.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -10,6 +10,7 @@ #include <pixman.h> #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; |
