translate-all: add missing munmap of the code_gen guard page for MIPS
authorEmilio G. Cota <cota@braap.org>
Fri, 22 Apr 2016 00:01:54 +0000 (20:01 -0400)
committerRichard Henderson <rth@twiddle.net>
Fri, 13 May 2016 00:06:41 +0000 (14:06 -1000)
Signed-off-by: Emilio G. Cota <cota@braap.org>
Message-Id: <1461283314-2353-2-git-send-email-cota@braap.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
translate-all.c

index 6b0ecb4f9f32690200cdee99962ae8207bcd4f20..93b91ba5e7c04b6a8e7ced7dfa65409c37ea2abe 100644 (file)
@@ -684,11 +684,11 @@ static inline void *alloc_code_gen_buffer(void)
         case 1:
             if (!cross_256mb(buf2, size)) {
                 /* Success!  Use the new buffer.  */
-                munmap(buf, size);
+                munmap(buf, size + qemu_real_host_page_size);
                 break;
             }
             /* Failure.  Work with what we had.  */
-            munmap(buf2, size);
+            munmap(buf2, size + qemu_real_host_page_size);
             /* fallthru */
         default:
             /* Split the original buffer.  Free the smaller half.  */