hotspot/src/share/vm/memory/collectorPolicy.hpp
changeset 13728 882756847a04
parent 13195 be27e1b6a4b9
child 15494 b3a322a0bea5
child 15482 470d0b0c09f1
--- a/hotspot/src/share/vm/memory/collectorPolicy.hpp	Fri Aug 31 16:39:35 2012 -0700
+++ b/hotspot/src/share/vm/memory/collectorPolicy.hpp	Sat Sep 01 13:25:18 2012 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2012, 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
@@ -25,9 +25,10 @@
 #ifndef SHARE_VM_MEMORY_COLLECTORPOLICY_HPP
 #define SHARE_VM_MEMORY_COLLECTORPOLICY_HPP
 
+#include "memory/allocation.hpp"
 #include "memory/barrierSet.hpp"
+#include "memory/generationSpec.hpp"
 #include "memory/genRemSet.hpp"
-#include "memory/permGen.hpp"
 
 // This class (or more correctly, subtypes of this class)
 // are used to define global garbage collector attributes.
@@ -53,21 +54,16 @@
 #endif // SERIALGC
 
 class GCPolicyCounters;
-class PermanentGenerationSpec;
 class MarkSweepPolicy;
 
 class CollectorPolicy : public CHeapObj<mtGC> {
  protected:
-  PermanentGenerationSpec *_permanent_generation;
   GCPolicyCounters* _gc_policy_counters;
 
   // Requires that the concrete subclass sets the alignment constraints
   // before calling.
   virtual void initialize_flags();
   virtual void initialize_size_info();
-  // Initialize "_permanent_generation" to a spec for the given kind of
-  // Perm Gen.
-  void initialize_perm_generation(PermGen::Name pgnm);
 
   size_t _initial_heap_byte_size;
   size_t _max_heap_byte_size;
@@ -155,11 +151,6 @@
 #endif // SERIALGC
 
 
-  virtual PermanentGenerationSpec *permanent_generation() {
-    assert(_permanent_generation != NULL, "Sanity check");
-    return _permanent_generation;
-  }
-
   virtual BarrierSet::Name barrier_set_name() = 0;
   virtual GenRemSet::Name  rem_set_name() = 0;
 
@@ -181,6 +172,12 @@
   // This method controls how a collector handles one or more
   // of its generations being fully allocated.
   virtual HeapWord *satisfy_failed_allocation(size_t size, bool is_tlab) = 0;
+  // This method controls how a collector handles a metadata allocation
+  // failure.
+  virtual MetaWord* satisfy_failed_metadata_allocation(ClassLoaderData* loader_data,
+                                                       size_t size,
+                                                       Metaspace::MetadataType mdtype);
+
   // Performace Counter support
   GCPolicyCounters* counters()     { return _gc_policy_counters; }