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 util: Clean up includes 2018-02-19 01:27:55 -05:00
bitops.c util: Clean up includes 2018-02-19 01:27:55 -05:00
crc32c.c util: Clean up includes 2018-02-19 01:27:55 -05:00
cutils.c qapi: rename QmpOutputVisitor to QObjectOutputVisitor 2018-02-27 08:05:33 -05:00
error.c include/qemu/osdep.h: Don't include qapi/error.h 2018-02-21 23:08:18 -05:00
getauxval.c util: Clean up includes 2018-02-19 01:27:55 -05:00
host-utils.c util: Clean up includes 2018-02-19 01:27:55 -05:00
log.c util: Move qemu-log to utils 2018-02-25 22:17:44 -05:00
Makefile.objs util: Move qemu-log to utils 2018-02-25 22:17:44 -05:00
mmap-alloc.c util/mmap-alloc: refactor a little bit for readability 2018-03-01 23:55:15 -05:00
module.c util: Clean up includes 2018-02-19 01:27:55 -05:00
oslib-posix.c Fix FreeBSD (10.x) build after 7dc9ae43 2018-03-01 08:55:43 -05:00
oslib-win32.c util: move declarations out of qemu-common.h 2018-02-22 09:25:48 -05:00
qemu-error.c util: Clean up includes 2018-02-19 01:27:55 -05:00
qemu-thread-posix.c util: Clean up includes 2018-02-19 01:27:55 -05:00
qemu-thread-win32.c util: Clean up includes 2018-02-19 01:27:55 -05:00
qemu-timer-common.c util: Clean up includes 2018-02-19 01:27:55 -05:00
range.c range: Replace internal representation of Range 2018-02-25 00:44:36 -05:00