mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
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>
This commit is contained in:
parent
54b237a612
commit
5a981ee823
4 changed files with 74 additions and 9 deletions
|
|
@ -36,6 +36,7 @@ have_funcs = [
|
|||
'posix_fallocate',
|
||||
'prctl',
|
||||
'memfd_create',
|
||||
'mremap',
|
||||
'strndup',
|
||||
]
|
||||
foreach f: have_funcs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue