equal
deleted
inserted
replaced
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 |