mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-16 22:05:21 -05:00
shm: add debug logging of how large the allocated memory buffer is
This commit is contained in:
parent
f884f77d99
commit
632b6ee0ea
1 changed files with 3 additions and 0 deletions
3
shm.c
3
shm.c
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue