shm: Add mmap+memmove fallback if mremap() does not exist
authorAlex Richardson <Alexander.Richardson@cl.cam.ac.uk>
Mon, 15 Mar 2021 22:25:52 +0000 (22:25 +0000)
committerAlexander Richardson <alexander.richardson@cl.cam.ac.uk>
Fri, 10 Sep 2021 11:35:54 +0000 (11:35 +0000)
commit5a981ee823795a61372c46ed7f6d2582450ee0af
tree12c0c554e8577dd0d06bce8bc7ba481ece3a8311
parent54b237a61257a41d35d018c5871331bdf1df77a6
shm: Add mmap+memmove fallback if mremap() does not exist

Some operating systems (e.g. FreeBSD) do not implement mremap.
In that case we can grow the mapping by trying to map adjacent memory.
If that fails we can fall back to creating a new larger mapping and
moving the old memory contents there.

Co-authored-by: Koop Mast <kwm@rainbow-runner.nl>
Signed-off-by: Alex Richardson <Alexander.Richardson@cl.cam.ac.uk>
meson.build
src/wayland-os.c
src/wayland-os.h
src/wayland-shm.c