--- old/src/hotspot/share/gc/g1/g1Allocator.hpp 2018-02-26 10:50:24.425892969 +0100 +++ new/src/hotspot/share/gc/g1/g1Allocator.hpp 2018-02-26 10:50:24.105880291 +0100 @@ -67,8 +67,6 @@ G1Allocator(G1CollectedHeap* heap) : _g1h(heap) { } virtual ~G1Allocator() { } - static G1Allocator* create_allocator(G1CollectedHeap* g1h); - #ifdef ASSERT // Do we currently have an active mutator region to allocate into? bool has_mutator_alloc_region(AllocationContext_t context) { return mutator_alloc_region(context)->get() != NULL; } @@ -223,8 +221,6 @@ G1PLABAllocator(G1Allocator* allocator); virtual ~G1PLABAllocator() { } - static G1PLABAllocator* create_allocator(G1Allocator* allocator); - virtual void waste(size_t& wasted, size_t& undo_wasted) = 0; // Allocate word_sz words in dest, either directly into the regions or by --- old/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2018-02-26 10:50:24.785907232 +0100 +++ new/src/hotspot/share/gc/g1/g1CollectedHeap.cpp 2018-02-26 10:50:24.505896139 +0100 @@ -1507,7 +1507,7 @@ _workers->initialize_workers(); _verifier = new G1HeapVerifier(this); - _allocator = G1Allocator::create_allocator(this); + _allocator = new G1DefaultAllocator(this); _heap_sizing_policy = G1HeapSizingPolicy::create(this, _g1_policy->analytics()); --- old/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp 2018-02-26 10:50:25.217924347 +0100 +++ new/src/hotspot/share/gc/g1/g1ParScanThreadState.cpp 2018-02-26 10:50:24.937913254 +0100 @@ -65,7 +65,7 @@ _surviving_young_words = _surviving_young_words_base + PADDING_ELEM_NUM; memset(_surviving_young_words, 0, real_length * sizeof(size_t)); - _plab_allocator = G1PLABAllocator::create_allocator(_g1h->allocator()); + _plab_allocator = new G1DefaultPLABAllocator(_g1h->allocator()); _dest[InCSetState::NotInCSet] = InCSetState::NotInCSet; // The dest for Young is used when the objects are aged enough to --- old/src/hotspot/share/gc/g1/g1Allocator_ext.cpp 2018-02-26 10:50:25.581938768 +0100 +++ /dev/null 2018-02-23 12:28:15.896051551 +0100 @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2014, 2015, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - * - */ - -#include "precompiled.hpp" -#include "gc/g1/g1Allocator.inline.hpp" -#include "gc/g1/g1CollectedHeap.hpp" - -G1Allocator* G1Allocator::create_allocator(G1CollectedHeap* g1h) { - return new G1DefaultAllocator(g1h); -} - -G1PLABAllocator* G1PLABAllocator::create_allocator(G1Allocator* allocator) { - return new G1DefaultPLABAllocator(allocator); -}