src/hotspot/share/gc/z/zHeap.cpp
changeset 54167 d0d26fc836dd
parent 54165 84295bd6d359
child 54168 eb54b34af2be
--- a/src/hotspot/share/gc/z/zHeap.cpp	Mon Mar 18 11:50:39 2019 +0100
+++ b/src/hotspot/share/gc/z/zHeap.cpp	Mon Mar 18 11:50:40 2019 +0100
@@ -404,17 +404,6 @@
   _reference_processor.enqueue_references();
 }
 
-void ZHeap::destroy_detached_pages() {
-  ZList<ZPage> list;
-
-  _page_allocator.flush_detached_pages(&list);
-
-  for (ZPage* page = list.remove_first(); page != NULL; page = list.remove_first()) {
-    // Delete the page
-    _page_allocator.destroy_page(page);
-  }
-}
-
 void ZHeap::select_relocation_set() {
   // Register relocatable pages with selector
   ZRelocationSetSelector selector;
@@ -464,6 +453,10 @@
   _relocation_set.reset();
 }
 
+void ZHeap::destroy_detached_pages() {
+  _page_allocator.destroy_detached_pages();
+}
+
 void ZHeap::relocate_start() {
   assert(SafepointSynchronize::is_at_safepoint(), "Should be at safepoint");