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 compositor: Log the full path of the config file we're using 2013-09-21 23:17:35 -07:00
frame.c cairo-util: Rework frame button handling 2013-11-07 16:35:06 -08:00
image-loader.c configure.ac: Enable AC_USE_SYSTEM_EXTENSIONS 2013-06-05 01:16:34 -04:00
image-loader.h Add new shared/image-loader.h to separate include dependencies 2013-01-28 16:02:04 -05:00
Makefile.am Add decoration frame support to cairo-util 2013-10-13 22:12:16 -07:00
matrix.c configure.ac: Enable AC_USE_SYSTEM_EXTENSIONS 2013-06-05 01:16:34 -04:00
matrix.h sdk: be C++ friendly 2013-03-28 14:03:58 -04:00
option-parser.c configure.ac: Enable AC_USE_SYSTEM_EXTENSIONS 2013-06-05 01:16:34 -04:00
os-compatibility.c os: use posix_fallocate in creating sharable buffers 2013-12-02 16:20:27 -08:00
os-compatibility.h compositor: add fallback strchrnul() 2012-06-12 12:29:13 -04:00
zalloc.h Add zalloc(size_t) allocator function 2013-08-08 13:46:13 -07:00