diff options
author | SeokYeon Hwang <syeon.hwang@samsung.com> | 2014-10-16 10:56:08 +0900 |
---|---|---|
committer | SeokYeon Hwang <syeon.hwang@samsung.com> | 2014-10-16 10:56:08 +0900 |
commit | 666b3aca5d24b3c1b8605605677e3191e5a3f5be (patch) | |
tree | 1cf49b302b19ed5a8860325dced4620e2be6193c /util | |
parent | b5cdaffbc8b189b5cf036e1e936dcaf38c5c078f (diff) | |
parent | 80a5e83c89810005065d21e7a3b5b5eca5e0d3ff (diff) | |
download | qemu-666b3aca5d24b3c1b8605605677e3191e5a3f5be.tar.gz qemu-666b3aca5d24b3c1b8605605677e3191e5a3f5be.tar.bz2 qemu-666b3aca5d24b3c1b8605605677e3191e5a3f5be.zip |
Merge branch 'tizen' into tizen_2.3
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
Conflicts:
hw/virtio/virtio-pci.c
hw/virtio/virtio-pci.h
package/build.macos-64
package/build.ubuntu-32
package/build.ubuntu-64
package/build.windows-32
package/changelog
package/pkginfo.manifest
tizen/src/Makefile.tizen
tizen/src/Makefile.tizen.i386
tizen/src/debug_ch.c
tizen/src/debug_ch.h
tizen/src/display/maru_sdl.c
tizen/src/display/maru_sdl_processing.c
tizen/src/display/maru_shm.c
tizen/src/display/maru_shm.h
tizen/src/ecs/Makefile.tizen
tizen/src/ecs/ecs.c
tizen/src/ecs/ecs_eventcast.h
tizen/src/ecs/ecs_msg.c
tizen/src/ecs/ecs_tethering.c
tizen/src/emul_state.c
tizen/src/emul_state.h
tizen/src/emulator.c
tizen/src/eventcast/common.h
tizen/src/eventcast/msg/eventcast.proto
tizen/src/hw/maru_pm.c
tizen/src/hw/pci/maru_brillcodec.c
tizen/src/hw/virtio/maru_virtio_jack.h
tizen/src/hw/virtio/maru_virtio_nfc.c
tizen/src/hw/virtio/maru_virtio_sensor.h
tizen/src/sdb.c
tizen/src/sdb.h
tizen/src/skin/client/skins/mobile-320x480-3btn/default.dbi
tizen/src/skin/client/skins/mobile-480x800-3btn/default.dbi
tizen/src/skin/client/skins/mobile-720x1280-3btn/default.dbi
tizen/src/skin/client/skins/mobile-general-3btn/default.dbi
tizen/src/skin/client/skins/wearable-general-1btn/default.dbi
tizen/src/skin/client/src/org/tizen/emulator/skin/EmulatorSkin.java
tizen/src/skin/maruskin_operation.c
tizen/src/skin/maruskin_server.c
tizen/src/tethering/Makefile.tizen
tizen/src/tethering/app_tethering.h
tizen/src/tethering/common.h
tizen/src/tethering/genmsg/tethering.pb-c.c
tizen/src/tethering/genmsg/tethering.pb-c.h
tizen/src/tethering/touch.h
tizen/src/util/osutil-linux.c
tizen/src/util/osutil-win32.c
tizen/src/util/osutil.h
Diffstat (limited to 'util')
-rw-r--r-- | util/oslib-posix.c | 14 | ||||
-rw-r--r-- | util/oslib-win32.c | 12 |
2 files changed, 25 insertions, 1 deletions
diff --git a/util/oslib-posix.c b/util/oslib-posix.c index d891d65f23..f7a8325459 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -68,7 +68,7 @@ extern int daemon(int, int); #endif #ifdef CONFIG_MARU -#include "../../tizen/src/maru_common.h" +#include "../../tizen/src/emulator_common.h" #endif int qemu_get_thread_id(void) @@ -139,9 +139,21 @@ void *qemu_memalign(size_t alignment, size_t size) return ptr; } +#ifdef CONFIG_MARU +void *preallocated_ram_ptr = NULL; +int preallocated_ram_size = -1; +#endif /* alloc shared memory pages */ void *qemu_anon_ram_alloc(size_t size) { +#ifdef CONFIG_MARU + if (size == preallocated_ram_size && preallocated_ram_ptr) { + void *ptr = preallocated_ram_ptr; + preallocated_ram_ptr = NULL; + preallocated_ram_size = -1; + return ptr; + } +#endif size_t align = QEMU_VMALLOC_ALIGN; size_t total = size + align - getpagesize(); void *ptr = mmap(0, total, PROT_READ | PROT_WRITE, diff --git a/util/oslib-win32.c b/util/oslib-win32.c index 67746cc5e4..fed8de3896 100644 --- a/util/oslib-win32.c +++ b/util/oslib-win32.c @@ -170,6 +170,10 @@ void *qemu_memalign(size_t alignment, size_t size) return ptr; } +#ifdef CONFIG_MARU +void *preallocated_ram_ptr = NULL; +int preallocated_ram_size = -1; +#endif void *qemu_anon_ram_alloc(size_t size) { void *ptr; @@ -177,6 +181,14 @@ void *qemu_anon_ram_alloc(size_t size) /* FIXME: this is not exactly optimal solution since VirtualAlloc has 64Kb granularity, but at least it guarantees us that the memory is page aligned. */ +#ifdef CONFIG_MARU + if (size == preallocated_ram_size && preallocated_ram_ptr) { + void *ptr = preallocated_ram_ptr; + preallocated_ram_ptr = NULL; + preallocated_ram_size = -1; + return ptr; + } +#endif ptr = VirtualAlloc(NULL, size, MEM_COMMIT, PAGE_READWRITE); trace_qemu_anon_ram_alloc(size, ptr); return ptr; |