Revision 45bc1f52 linux-user/mmap.c
b/linux-user/mmap.c | ||
---|---|---|
382 | 382 |
end = start + len; |
383 | 383 |
real_end = HOST_PAGE_ALIGN(end); |
384 | 384 |
|
385 |
/* |
|
386 |
* Test if requested memory area fits target address space |
|
387 |
* It can fail only on 64-bit host with 32-bit target. |
|
388 |
* On any other target/host host mmap() handles this error correctly. |
|
389 |
*/ |
|
390 |
if ((unsigned long)start + len - 1 > (abi_ulong) -1) { |
|
391 |
errno = EINVAL; |
|
392 |
goto fail; |
|
393 |
} |
|
394 |
|
|
385 | 395 |
for(addr = real_start; addr < real_end; addr += TARGET_PAGE_SIZE) { |
386 | 396 |
flg = page_get_flags(addr); |
387 | 397 |
if (flg & PAGE_RESERVED) { |
Also available in: Unified diff