Revision 4f2ac237 linux-user/mmap.c

b/linux-user/mmap.c
152 152
                 int flags, int fd, unsigned long offset)
153 153
{
154 154
    unsigned long ret, end, host_start, host_end, retaddr, host_offset, host_len;
155
#if defined(__alpha__) || defined(__sparc__) || defined(__x86_64__)
156
    static unsigned long last_start = 0x40000000;
157
#endif
155 158

  
156 159
#ifdef DEBUG_MMAP
157 160
    {
......
190 193
    if (!(flags & MAP_FIXED)) {
191 194
#if defined(__alpha__) || defined(__sparc__) || defined(__x86_64__)
192 195
        /* tell the kenel to search at the same place as i386 */
193
        if (host_start == 0)
194
            host_start = 0x40000000;
196
        if (host_start == 0) {
197
            host_start = last_start;
198
            last_start += HOST_PAGE_ALIGN(len);
199
        }
195 200
#endif
196 201
        if (host_page_size != real_host_page_size) {
197 202
            /* NOTE: this code is only for debugging with '-p' option */

Also available in: Unified diff