< prev index next >

src/hotspot/share/gc/z/zPageAllocator.cpp

Print this page

        

*** 240,254 **** detach_memory(_pre_mapped.virtual_memory(), _pre_mapped.physical_memory()); _pre_mapped.clear(); } - void ZPageAllocator::map_page(ZPage* page) { - // Map physical memory - _physical.map(page->physical_memory(), page->start()); - } - void ZPageAllocator::detach_page(ZPage* page) { // Detach the memory mapping. detach_memory(page->virtual_memory(), page->physical_memory()); // Add to list of detached pages --- 240,249 ----
*** 265,274 **** --- 260,284 ---- } delete page; } + void ZPageAllocator::map_page(ZPage* page) { + // Map physical memory + if (!page->is_mapped()) { + _physical.map(page->physical_memory(), page->start()); + } else if (ZVerifyViews) { + _physical.debug_map(page->physical_memory(), page->start()); + } + } + + void ZPageAllocator::unmap_all_pages() { + ZPhysicalMemory pmem(ZPhysicalMemorySegment(0 /* start */, ZAddressOffsetMax)); + _physical.debug_unmap(pmem, 0 /* offset */); + pmem.clear(); + } + void ZPageAllocator::flush_detached_pages(ZList<ZPage>* list) { ZLocker<ZLock> locker(&_lock); list->transfer(&_detached); }
*** 396,408 **** // Out of memory return NULL; } // Map page if needed ! if (!page->is_mapped()) { ! map_page(page); ! } // Reset page. This updates the page's sequence number and must // be done after page allocation, which potentially blocked in // a safepoint where the global sequence number was updated. page->reset(); --- 406,416 ---- // Out of memory return NULL; } // Map page if needed ! map_page(page); // Reset page. This updates the page's sequence number and must // be done after page allocation, which potentially blocked in // a safepoint where the global sequence number was updated. page->reset();
*** 453,483 **** // Clear physical mapping pmem.clear(); } - void ZPageAllocator::flip_page(ZPage* page) { - const ZPhysicalMemory& pmem = page->physical_memory(); - const uintptr_t addr = page->start(); - - // Flip physical mapping - _physical.flip(pmem, addr); - } - - void ZPageAllocator::flip_pre_mapped() { - if (_pre_mapped.available() == 0) { - // Nothing to flip - return; - } - - const ZPhysicalMemory& pmem = _pre_mapped.physical_memory(); - const ZVirtualMemory& vmem = _pre_mapped.virtual_memory(); - - // Flip physical mapping - _physical.flip(pmem, vmem.start()); - } - void ZPageAllocator::free_page(ZPage* page, bool reclaimed) { ZLocker<ZLock> locker(&_lock); // Update used statistics decrease_used(page->size(), reclaimed); --- 461,470 ----
< prev index next >