comparison src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp @ 1387:0bfd3fb24150

6858496: Clear all SoftReferences before an out-of-memory due to GC overhead limit. Summary: Ensure a full GC that clears SoftReferences before throwing an out-of-memory Reviewed-by: ysr, jcoomes
author jmasa
date Tue, 13 Apr 2010 13:52:10 -0700
parents 7b0e9cba0307
children c18cbe5936b8
comparison
equal deleted inserted replaced
1361:6b73e879f1c2 1387:0bfd3fb24150
1 /* 1 /*
2 * Copyright 2001-2009 Sun Microsystems, Inc. All Rights Reserved. 2 * Copyright 2001-2010 Sun Microsystems, Inc. All Rights Reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
23 */ 23 */
24 24
25 class AdjoiningGenerations; 25 class AdjoiningGenerations;
26 class GCTaskManager; 26 class GCTaskManager;
27 class PSAdaptiveSizePolicy; 27 class PSAdaptiveSizePolicy;
28 class GenerationSizer;
29 class CollectorPolicy;
28 30
29 class ParallelScavengeHeap : public CollectedHeap { 31 class ParallelScavengeHeap : public CollectedHeap {
30 friend class VMStructs; 32 friend class VMStructs;
31 private: 33 private:
32 static PSYoungGen* _young_gen; 34 static PSYoungGen* _young_gen;
41 43
42 size_t _perm_gen_alignment; 44 size_t _perm_gen_alignment;
43 size_t _young_gen_alignment; 45 size_t _young_gen_alignment;
44 size_t _old_gen_alignment; 46 size_t _old_gen_alignment;
45 47
48 GenerationSizer* _collector_policy;
49
46 inline size_t set_alignment(size_t& var, size_t val); 50 inline size_t set_alignment(size_t& var, size_t val);
47 51
48 // Collection of generations that are adjacent in the 52 // Collection of generations that are adjacent in the
49 // space reserved for the heap. 53 // space reserved for the heap.
50 AdjoiningGenerations* _gens; 54 AdjoiningGenerations* _gens;
69 }; 73 };
70 74
71 ParallelScavengeHeap::Name kind() const { 75 ParallelScavengeHeap::Name kind() const {
72 return CollectedHeap::ParallelScavengeHeap; 76 return CollectedHeap::ParallelScavengeHeap;
73 } 77 }
78
79 CollectorPolicy* collector_policy() const { return (CollectorPolicy*) _collector_policy; }
80 // GenerationSizer* collector_policy() const { return _collector_policy; }
74 81
75 static PSYoungGen* young_gen() { return _young_gen; } 82 static PSYoungGen* young_gen() { return _young_gen; }
76 static PSOldGen* old_gen() { return _old_gen; } 83 static PSOldGen* old_gen() { return _old_gen; }
77 static PSPermGen* perm_gen() { return _perm_gen; } 84 static PSPermGen* perm_gen() { return _perm_gen; }
78 85