aboutsummaryrefslogtreecommitdiffstats
path: root/cursor/wayland-cursor.c
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>2013-11-29 17:47:08 +0200
committerKristian Høgsberg <krh@bitplanet.net>2013-12-02 16:18:59 -0800
commit011b6954031a25de8d9eb39631b6837553bb3cfb (patch)
treed20824a09b5d09a3ba4b7909837761d19fbe6dc3 /cursor/wayland-cursor.c
parentAdd -pthread to AM_CFLAGS to do the right thing when using threads (diff)
downloadwayland-011b6954031a25de8d9eb39631b6837553bb3cfb.tar
wayland-011b6954031a25de8d9eb39631b6837553bb3cfb.tar.gz
wayland-011b6954031a25de8d9eb39631b6837553bb3cfb.tar.bz2
wayland-011b6954031a25de8d9eb39631b6837553bb3cfb.tar.lz
wayland-011b6954031a25de8d9eb39631b6837553bb3cfb.tar.xz
wayland-011b6954031a25de8d9eb39631b6837553bb3cfb.tar.zst
wayland-011b6954031a25de8d9eb39631b6837553bb3cfb.zip
os: use posix_fallocate in creating sharable buffers
If posix_fallocate is available, use it instead of ftruncate. Unlike ftruncate, when posix_fallocate succeeds, it guarantees that you cannot run out of disk space, when later writing to the mmap()'ed file. With posix_fallocate, if os_create_anonymous_file() succeeds, the program cannot get a SIGBUS later from accessing this file via mmap. If there is insufficient disk space, the function fails and errno is set to ENOSPC. This is useful on systems, that limit the available buffer space by having XDG_RUNTIME_DIR on a small tmpfs. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'cursor/wayland-cursor.c')
0 files changed, 0 insertions, 0 deletions