weston/shared
Pekka Paalanen 5b4ddbc11e 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>
2013-12-02 16:20:27 -08:00
..
cairo-util.c window.c: Don't put titlebars on menu windows 2013-10-23 22:12:13 -07:00
cairo-util.h cairo-util: Rework frame button handling 2013-11-07 16:35:06 -08:00
config-parser.c config: Don't crash if we don't have a config file 2013-09-26 16:24:33 -07:00
config-parser.h
frame.c cairo-util: Rework frame button handling 2013-11-07 16:35:06 -08:00
image-loader.c
image-loader.h
Makefile.am Add decoration frame support to cairo-util 2013-10-13 22:12:16 -07:00
matrix.c
matrix.h
option-parser.c
os-compatibility.c os: use posix_fallocate in creating sharable buffers 2013-12-02 16:20:27 -08:00
os-compatibility.h
zalloc.h