mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
Fix -linux-user build by reverting r5701
Unfortunately, -linux-user doesn't use osdep as it replaces some of those functions with specific ones. The code #ifdef code in exec.c needs to remain in place so instead of introducing a qemu_getpagesize() let's just use getpagesize() in the non-Windows implementation of qemu_vmalloc. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5703 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
6f7af85d98
commit
c2b48b69cb
11
exec.c
11
exec.c
@ -231,7 +231,16 @@ static void page_init(void)
|
||||
{
|
||||
/* NOTE: we can always suppose that qemu_host_page_size >=
|
||||
TARGET_PAGE_SIZE */
|
||||
qemu_real_host_page_size = qemu_getpagesize();
|
||||
#ifdef _WIN32
|
||||
{
|
||||
SYSTEM_INFO system_info;
|
||||
|
||||
GetSystemInfo(&system_info);
|
||||
qemu_real_host_page_size = system_info.dwPageSize;
|
||||
}
|
||||
#else
|
||||
qemu_real_host_page_size = getpagesize();
|
||||
#endif
|
||||
if (qemu_host_page_size == 0)
|
||||
qemu_host_page_size = qemu_real_host_page_size;
|
||||
if (qemu_host_page_size < TARGET_PAGE_SIZE)
|
||||
|
15
osdep.c
15
osdep.c
@ -66,14 +66,6 @@ void qemu_vfree(void *ptr)
|
||||
VirtualFree(ptr, 0, MEM_RELEASE);
|
||||
}
|
||||
|
||||
long qemu_getpagesize(void)
|
||||
{
|
||||
SYSTEM_INFO system_info;
|
||||
|
||||
GetSystemInfo(&system_info);
|
||||
return system_info.dwPageSize;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#if defined(USE_KQEMU)
|
||||
@ -198,11 +190,6 @@ void *qemu_memalign(size_t alignment, size_t size)
|
||||
#endif
|
||||
}
|
||||
|
||||
long qemu_getpagesize(void)
|
||||
{
|
||||
return sysconf(_SC_PAGESIZE);
|
||||
}
|
||||
|
||||
/* alloc shared memory pages */
|
||||
void *qemu_vmalloc(size_t size)
|
||||
{
|
||||
@ -213,7 +200,7 @@ void *qemu_vmalloc(size_t size)
|
||||
#ifdef _BSD
|
||||
return valloc(size);
|
||||
#else
|
||||
return memalign(qemu_getpagesize(), size);
|
||||
return memalign(getpagesize(), size);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user