src/share/vm/memory/space.hpp

Print this page
rev 6668 : 8048112: G1 Full GC needs to support the case when the very first region is not available
Summary: To allow uncommit of regions within the heap, G1 Full GC should correctly handle the case when the very first region is not available (uncommitted). Provide support for that by lazily initializing the compaction point during iteration of the list of heap regions. Further refactor the code to let the G1CollectedHeap handle finding the next region to compact into.
Reviewed-by:

@@ -328,10 +328,13 @@
 class CompactPoint : public StackObj {
 public:
   Generation* gen;
   CompactibleSpace* space;
   HeapWord* threshold;
+
+  CompactPoint() : gen(NULL), space(NULL), threshold(0) {}
+
   CompactPoint(Generation* _gen, CompactibleSpace* _space,
                HeapWord* _threshold) :
     gen(_gen), space(_space), threshold(_threshold) {}
 };