qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] mmap.c: Reuse unmapped memory areas.
@ 2008-02-16 20:24 Edgar E. Iglesias
  0 siblings, 0 replies; only message in thread
From: Edgar E. Iglesias @ 2008-02-16 20:24 UTC (permalink / raw)
  To: qemu-devel

Try to rewind mmap_next_start when unmapping memory. Simple tests in test-mmap.c now pass.

Best regards
-- 
Edgar E. Iglesias
Axis Communications AB

diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index 6292826..78a8162 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -385,6 +385,9 @@ int target_munmap(abi_ulong start, abi_ulong len)
             real_end -= qemu_host_page_size;
     }
 
+    if (start < mmap_next_start)
+    	mmap_next_start = start;
+
     /* unmap what we can */
     if (real_start < real_end) {
         ret = munmap(g2h(real_start), real_end - real_start);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-02-16 20:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-16 20:24 [Qemu-devel] [PATCH] mmap.c: Reuse unmapped memory areas Edgar E. Iglesias

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).