21 * questions. |
21 * questions. |
22 * |
22 * |
23 */ |
23 */ |
24 |
24 |
25 #include "precompiled.hpp" |
25 #include "precompiled.hpp" |
26 #include "gc/serial/defNewGeneration.hpp" |
|
27 #include "gc/serial/tenuredGeneration.hpp" |
|
28 #include "gc/shared/cardTableRS.hpp" |
26 #include "gc/shared/cardTableRS.hpp" |
29 #include "gc/shared/generationSpec.hpp" |
27 #include "gc/shared/generationSpec.hpp" |
30 #include "memory/binaryTreeDictionary.hpp" |
28 #include "memory/binaryTreeDictionary.hpp" |
31 #include "memory/filemap.hpp" |
29 #include "memory/filemap.hpp" |
32 #include "runtime/java.hpp" |
30 #include "runtime/java.hpp" |
33 #include "utilities/macros.hpp" |
31 #include "utilities/macros.hpp" |
34 #if INCLUDE_ALL_GCS |
32 #if INCLUDE_CMSGC |
35 #include "gc/cms/concurrentMarkSweepGeneration.hpp" |
33 #include "gc/cms/concurrentMarkSweepGeneration.hpp" |
36 #include "gc/cms/parNewGeneration.hpp" |
34 #include "gc/cms/parNewGeneration.hpp" |
37 #endif // INCLUDE_ALL_GCS |
35 #endif |
|
36 #if INCLUDE_SERIALGC |
|
37 #include "gc/serial/defNewGeneration.hpp" |
|
38 #include "gc/serial/tenuredGeneration.hpp" |
|
39 #endif |
38 |
40 |
39 Generation* GenerationSpec::init(ReservedSpace rs, CardTableRS* remset) { |
41 Generation* GenerationSpec::init(ReservedSpace rs, CardTableRS* remset) { |
40 switch (name()) { |
42 switch (name()) { |
|
43 #if INCLUDE_SERIALGC |
41 case Generation::DefNew: |
44 case Generation::DefNew: |
42 return new DefNewGeneration(rs, init_size()); |
45 return new DefNewGeneration(rs, init_size()); |
43 |
46 |
44 case Generation::MarkSweepCompact: |
47 case Generation::MarkSweepCompact: |
45 return new TenuredGeneration(rs, init_size(), remset); |
48 return new TenuredGeneration(rs, init_size(), remset); |
|
49 #endif |
46 |
50 |
47 #if INCLUDE_ALL_GCS |
51 #if INCLUDE_CMSGC |
48 case Generation::ParNew: |
52 case Generation::ParNew: |
49 return new ParNewGeneration(rs, init_size()); |
53 return new ParNewGeneration(rs, init_size()); |
50 |
54 |
51 case Generation::ConcurrentMarkSweep: { |
55 case Generation::ConcurrentMarkSweep: { |
52 assert(UseConcMarkSweepGC, "UseConcMarkSweepGC should be set"); |
56 assert(UseConcMarkSweepGC, "UseConcMarkSweepGC should be set"); |