< prev index next >

src/hotspot/os_cpu/linux_x86/gc/z/zPhysicalMemoryBacking_linux_x86.cpp

Print this page

        

*** 235,270 **** // From an NMT point of view we treat the first heap mapping (marked0) as committed return ZAddress::marked0(offset); } void ZPhysicalMemoryBacking::map(ZPhysicalMemory pmem, uintptr_t offset) const { ! if (ZUnmapBadViews) { ! // Only map the good view, for debugging only map_view(pmem, ZAddress::good(offset), AlwaysPreTouch); } else { // Map all views map_view(pmem, ZAddress::marked0(offset), AlwaysPreTouch); map_view(pmem, ZAddress::marked1(offset), AlwaysPreTouch); map_view(pmem, ZAddress::remapped(offset), AlwaysPreTouch); } } void ZPhysicalMemoryBacking::unmap(ZPhysicalMemory pmem, uintptr_t offset) const { ! if (ZUnmapBadViews) { ! // Only map the good view, for debugging only unmap_view(pmem, ZAddress::good(offset)); } else { // Unmap all views unmap_view(pmem, ZAddress::marked0(offset)); unmap_view(pmem, ZAddress::marked1(offset)); unmap_view(pmem, ZAddress::remapped(offset)); } } ! void ZPhysicalMemoryBacking::flip(ZPhysicalMemory pmem, uintptr_t offset) const { ! assert(ZUnmapBadViews, "Should be enabled"); ! const uintptr_t addr_good = ZAddress::good(offset); ! const uintptr_t addr_bad = ZAddress::is_marked(ZAddressGoodMask) ? ZAddress::remapped(offset) : ZAddress::marked(offset); ! // Map/Unmap views ! map_view(pmem, addr_good, false /* pretouch */); ! unmap_view(pmem, addr_bad); } --- 235,273 ---- // From an NMT point of view we treat the first heap mapping (marked0) as committed return ZAddress::marked0(offset); } void ZPhysicalMemoryBacking::map(ZPhysicalMemory pmem, uintptr_t offset) const { ! if (ZVerifyViews) { ! // Map good view map_view(pmem, ZAddress::good(offset), AlwaysPreTouch); } else { // Map all views map_view(pmem, ZAddress::marked0(offset), AlwaysPreTouch); map_view(pmem, ZAddress::marked1(offset), AlwaysPreTouch); map_view(pmem, ZAddress::remapped(offset), AlwaysPreTouch); } } void ZPhysicalMemoryBacking::unmap(ZPhysicalMemory pmem, uintptr_t offset) const { ! if (ZVerifyViews) { ! // Unmap good view unmap_view(pmem, ZAddress::good(offset)); } else { // Unmap all views unmap_view(pmem, ZAddress::marked0(offset)); unmap_view(pmem, ZAddress::marked1(offset)); unmap_view(pmem, ZAddress::remapped(offset)); } } ! void ZPhysicalMemoryBacking::debug_map(ZPhysicalMemory pmem, uintptr_t offset) const { ! // Map good view ! assert(ZVerifyViews, "Should be enabled"); ! map_view(pmem, ZAddress::good(offset), false /* pretouch */); ! } ! ! void ZPhysicalMemoryBacking::debug_unmap(ZPhysicalMemory pmem, uintptr_t offset) const { ! // Unmap good view ! assert(ZVerifyViews, "Should be enabled"); ! unmap_view(pmem, ZAddress::good(offset)); }
< prev index next >