From 38183310be7af6af5ee60e7c9e9647133a7d11c3 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 14 May 2014 17:43:21 +0800 Subject: memory: move preallocation code out of exec.c So that backends can use it. Since we need the page size for efficiency, move code to compute it out of translate-all.c and into util/oslib-win32.c. Signed-off-by: Paolo Bonzini Signed-off-by: Hu Tao Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/qemu/osdep.h | 2 ++ include/sysemu/os-win32.h | 2 ++ 2 files changed, 4 insertions(+) (limited to 'include') diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index ffb296692d..9c1a119703 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -251,4 +251,6 @@ void qemu_init_auxval(char **envp); void qemu_set_tty_echo(int fd, bool echo); +void os_mem_prealloc(int fd, char *area, size_t sz); + #endif diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h index bf8523ada1..af3fbc47d8 100644 --- a/include/sysemu/os-win32.h +++ b/include/sysemu/os-win32.h @@ -89,6 +89,8 @@ static inline void os_setup_post(void) {} void os_set_line_buffering(void); static inline void os_set_proc_name(const char *dummy) {} +size_t getpagesize(void); + #if !defined(EPROTONOSUPPORT) # define EPROTONOSUPPORT EINVAL #endif -- cgit v1.2.3