annotate src/hotspot/share/gc/shared/gcArguments.hpp @ 48101:cde4a65ba47d

8189389: Move heap creation into GC interface Reviewed-by: pliden, eosterlund
author rkennke
date Thu, 16 Nov 2017 12:53:29 +0100
parents 4c42aa431f40
children 34fe70d22e9c
rev   line source
rkennke@48089 1 /*
rkennke@48089 2 * Copyright (c) 2017, Red Hat, Inc. and/or its affiliates.
rkennke@48089 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
rkennke@48089 4 *
rkennke@48089 5 * This code is free software; you can redistribute it and/or modify it
rkennke@48089 6 * under the terms of the GNU General Public License version 2 only, as
rkennke@48089 7 * published by the Free Software Foundation.
rkennke@48089 8 *
rkennke@48089 9 * This code is distributed in the hope that it will be useful, but WITHOUT
rkennke@48089 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
rkennke@48089 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
rkennke@48089 12 * version 2 for more details (a copy is included in the LICENSE file that
rkennke@48089 13 * accompanied this code).
rkennke@48089 14 *
rkennke@48089 15 * You should have received a copy of the GNU General Public License version
rkennke@48089 16 * 2 along with this work; if not, write to the Free Software Foundation,
rkennke@48089 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
rkennke@48089 18 *
rkennke@48089 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
rkennke@48089 20 * or visit www.oracle.com if you need additional information or have any
rkennke@48089 21 * questions.
rkennke@48089 22 *
rkennke@48089 23 */
rkennke@48089 24
rkennke@48089 25 #ifndef SHARE_GC_SHARED_GCARGUMENTS_HPP
rkennke@48089 26 #define SHARE_GC_SHARED_GCARGUMENTS_HPP
rkennke@48089 27
rkennke@48089 28 #include "memory/allocation.hpp"
rkennke@48089 29
rkennke@48101 30 class CollectedHeap;
rkennke@48101 31
rkennke@48089 32 class GCArguments : public CHeapObj<mtGC> {
rkennke@48089 33 private:
rkennke@48089 34 static GCArguments* _instance;
rkennke@48089 35
rkennke@48089 36 static void select_gc();
rkennke@48089 37 static void select_gc_ergonomically();
rkennke@48089 38 static bool gc_selected();
rkennke@48089 39
rkennke@48101 40 protected:
rkennke@48101 41 template <class Heap, class Policy>
rkennke@48101 42 CollectedHeap* create_heap_with_policy();
rkennke@48101 43
rkennke@48089 44 public:
rkennke@48089 45 static jint initialize();
rkennke@48089 46 static bool is_initialized();
rkennke@48089 47 static GCArguments* arguments();
rkennke@48089 48
rkennke@48089 49 virtual void initialize_flags();
rkennke@48089 50
rkennke@48089 51 virtual size_t conservative_max_heap_alignment() = 0;
rkennke@48101 52
rkennke@48101 53 virtual CollectedHeap* create_heap() = 0;
rkennke@48089 54 };
rkennke@48089 55
rkennke@48089 56 #endif // SHARE_GC_SHARED_GCARGUMENTS_HPP