Skip to contentSkip to conversation

Support 2**64 bytes memory regions.

PATCH New Alexander Barabash 1 participant 1 message Jan 7, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Support 2**64 bytes memory regions.

Memory regions created with size UINT64_MAX are currently treated as regions of size 2**64 bytes. This patch adds full support for such regions.

---
 exec.c   |    4 ++++
 memory.c |   72 ++++++++++++++++++++++++++++++++++++++++++++------------------
 2 files changed, 55 insertions(+), 21 deletions(-)
exec.c +4 -0
index 140eb56..8ce8ab4 100644
@@ -789,6 +789,10 @@ static void mem_add(MemoryListener *listener, MemoryRegionSection *section)
         remain.size -= now.size;
         remain.offset_within_address_space += now.size;
         remain.offset_within_region += now.size;
+        if ((remain.size == TARGET_PAGE_SIZE - 1) &&
+            (section->size == UINT64_MAX)) {
+            remain.size = TARGET_PAGE_SIZE;
+        }
     }
     now = remain;
     if (now.size) {
memory.c +51 -21

178 lines not on this page · raw message

Signature · 1 line
1.7.9.5