diff mbox

[v2,3/3] linux-user/mmap.c: Use TARGET_PAGE_SIZE as the increasing step

Message ID 1452502867-12148-3-git-send-email-chengang@emindsoft.com.cn
State New
Headers show

Commit Message

Chen Gang Jan. 11, 2016, 9:01 a.m. UTC
From: Chen Gang <chengang@emindsoft.com.cn>

Just like another areas have done.
---
 linux-user/mmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 51c381d..86c270b 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -151,7 +151,7 @@  static int mmap_frag(abi_ulong real_start,
 
     /* get the protection of the target pages outside the mapping */
     prot1 = 0;
-    for(addr = real_start; addr < real_end; addr++) {
+    for (addr = real_start; addr < real_end; addr += TARGET_PAGE_SIZE) {
         if (addr < start || addr >= end)
             prot1 |= page_get_flags(addr);
     }