OSDN Git Service

linux-user: Rewrite mmap_frag
authorRichard Henderson <richard.henderson@linaro.org>
Fri, 7 Jul 2023 20:40:43 +0000 (21:40 +0100)
committerRichard Henderson <richard.henderson@linaro.org>
Sat, 15 Jul 2023 07:02:32 +0000 (08:02 +0100)
commit99982beb4d0030470aa761b8b7bc6dc66c39a707
tree7b910f7c5880fe823af2efcdfb90be12c361bdbc
parent7bdc1acc249ba9cfe1659145d58a96ebc4dbf6e4
linux-user: Rewrite mmap_frag

Use 'last' variables instead of 'end' variables.
Always zero MAP_ANONYMOUS fragments, which we previously
failed to do if they were not writable; early exit in case
we allocate a new page from the kernel, known zeros.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230707204054.8792-16-richard.henderson@linaro.org>
linux-user/mmap.c