mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
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 <pbonzini@redhat.com> Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
e1c57ab86f
commit
38183310be
6 changed files with 97 additions and 50 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue