summaryrefslogtreecommitdiff
path: root/sim/syscall_emul.hh
diff options
context:
space:
mode:
Diffstat (limited to 'sim/syscall_emul.hh')
-rw-r--r--sim/syscall_emul.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/sim/syscall_emul.hh b/sim/syscall_emul.hh
index 768bc3700..831708a21 100644
--- a/sim/syscall_emul.hh
+++ b/sim/syscall_emul.hh
@@ -410,8 +410,8 @@ mmapFunc(SyscallDesc *desc, int num, Process *p, ExecContext *xc)
if (start == 0) {
// user didn't give an address... pick one from our "mmap region"
- start = p->mmap_base;
- p->mmap_base += RoundUp<Addr>(length, VMPageSize);
+ start = p->mmap_end;
+ p->mmap_end += RoundUp<Addr>(length, VMPageSize);
}
if (!(flags & OS::TGT_MAP_ANONYMOUS)) {