提交 c65ffe6d 编写于 作者: A amateur 提交者: Riku Voipio

linux-user: mmap_reserve() not controlled by RESERVED_VA

mmap_reserve() should be called only when RESERVED_VA is enabled.
Otherwise, unmaped virtual address space will never be reusable. This
bug will exhaust virtual address space in extreme conditions.
Signed-off-by: NRiku Voipio <riku.voipio@nokia.com>
上级 b0e102dd
......@@ -697,7 +697,9 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
old_size, new_size,
flags | MREMAP_FIXED,
g2h(mmap_start));
mmap_reserve(old_addr, old_size);
if ( RESERVED_VA ) {
mmap_reserve(old_addr, old_size);
}
}
} else {
int prot = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册