unicorn/qemu/util
Cao jin f2a5ddf5dc
util/mmap-alloc: refactor a little bit for readability
1st mmap returns *ptr* which aligns to host page size,

| size + align |
------------------------------------------
ptr

input param *align* could be 1M, or 2M, or host page size. After
QEMU_ALIGN_UP, offset will >= 0

2nd mmap use flag MAP_FIXED, then it return ptr+offset, or else fail.
If it success, then we will have something like:

| offset | size |
--------------------------------------
ptr ptr1

*ptr1* is what we really want to return, it equals ptr+offset.

Backports commit 6e4c890e15b23f078650499fbde11760b8eccf10 from qemu
2018-03-01 23:55:15 -05:00
..
bitmap.c
bitops.c
crc32c.c
cutils.c
error.c
getauxval.c
host-utils.c
log.c
Makefile.objs
mmap-alloc.c
module.c
oslib-posix.c
oslib-win32.c
qemu-error.c
qemu-thread-posix.c
qemu-thread-win32.c
qemu-timer-common.c
range.c