From: Zhang Xiantao <[EMAIL PROTECTED]> Since other cpus may use big page size, allocated memory must bed aligned with host page size. Otherwise, it will block userspace memory allocation mechanism.
Signed-off-by: Zhang Xiantao <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> diff --git a/qemu/osdep.c b/qemu/osdep.c index 0eaf2ba..195eefc 100644 --- a/qemu/osdep.c +++ b/qemu/osdep.c @@ -183,7 +183,7 @@ void *qemu_vmalloc(size_t size) #ifdef _BSD return valloc(size); #else - return memalign(4096, size); + return memalign(TARGET_PAGE_SIZE, size); #endif } ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ kvm-commits mailing list kvm-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-commits