Index: linux-user/mmap.c =================================================================== RCS file: /cvsroot/qemu/qemu/linux-user/mmap.c,v retrieving revision 1.5 diff -u -d -w -B -b -d -p -r1.5 mmap.c --- linux-user/mmap.c 17 Mar 2004 23:46:04 -0000 1.5 +++ linux-user/mmap.c 25 Apr 2004 17:16:26 -0000 @@ -152,6 +152,9 @@ long target_mmap(unsigned long start, un int flags, int fd, unsigned long offset) { unsigned long ret, end, host_start, host_end, retaddr, host_offset, host_len; +#if defined(__alpha__) || defined(__sparc__) || defined(__x86_64__) + static unsigned long last_start = 0x40000000; +#endif #ifdef DEBUG_MMAP { @@ -190,8 +193,10 @@ long target_mmap(unsigned long start, un if (!(flags & MAP_FIXED)) { #if defined(__alpha__) || defined(__sparc__) || defined(__x86_64__) /* tell the kenel to search at the same place as i386 */ - if (host_start == 0) - host_start = 0x40000000; + if (host_start == 0) { + host_start = last_start; + last_start += HOST_PAGE_ALIGN(len); + } #endif if (host_page_size != real_host_page_size) { /* NOTE: this code is only for debugging with '-p' option */