shm: add debug logging of how large the allocated memory buffer is

This commit is contained in:
Daniel Eklöf 2019-11-02 00:23:23 +01:00
parent f884f77d99
commit 632b6ee0ea
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

3
shm.c
View file

@ -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;