diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/oslib-posix.c | 5 | ||||
-rw-r--r-- | util/oslib-win32.c | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/util/oslib-posix.c b/util/oslib-posix.c index 8c9d80e9fe..16fcec2f37 100644 --- a/util/oslib-posix.c +++ b/util/oslib-posix.c @@ -124,7 +124,7 @@ void *qemu_memalign(size_t alignment, size_t size) } /* alloc shared memory pages */ -void *qemu_anon_ram_alloc(size_t size) +void *qemu_anon_ram_alloc(size_t size, uint64_t *alignment) { size_t align = QEMU_VMALLOC_ALIGN; size_t total = size + align - getpagesize(); @@ -136,6 +136,9 @@ void *qemu_anon_ram_alloc(size_t size) return NULL; } + if (alignment) { + *alignment = align; + } ptr += offset; total -= offset; diff --git a/util/oslib-win32.c b/util/oslib-win32.c index a3eab4acba..87cfbe0834 100644 --- a/util/oslib-win32.c +++ b/util/oslib-win32.c @@ -67,7 +67,7 @@ void *qemu_memalign(size_t alignment, size_t size) return qemu_oom_check(qemu_try_memalign(alignment, size)); } -void *qemu_anon_ram_alloc(size_t size) +void *qemu_anon_ram_alloc(size_t size, uint64_t *align) { void *ptr; |