Existing callers are checking for MAP_FAILED, so we should return that on error. Backports commit 9d4ec9370a36f8a564e1ba05519328c0bd60da13 from qemu
Anonymous and file-backed RAM allocation are now almost exactly the same. Reduce code duplication by moving RAM mmap code out of oslib-posix.c and exec.c. Backports commit 794e8f301a17953efa78ab7538019ec43c59e82a from qemu