equal
deleted
inserted
replaced
39 // |
39 // |
40 // The Generation class hierarchy: |
40 // The Generation class hierarchy: |
41 // |
41 // |
42 // Generation - abstract base class |
42 // Generation - abstract base class |
43 // - DefNewGeneration - allocation area (copy collected) |
43 // - DefNewGeneration - allocation area (copy collected) |
44 // - ParNewGeneration - a DefNewGeneration that is collected by |
|
45 // several threads |
|
46 // - CardGeneration - abstract class adding offset array behavior |
44 // - CardGeneration - abstract class adding offset array behavior |
47 // - TenuredGeneration - tenured (old object) space (markSweepCompact) |
45 // - TenuredGeneration - tenured (old object) space (markSweepCompact) |
48 // - ConcurrentMarkSweepGeneration - Mostly Concurrent Mark Sweep Generation |
|
49 // (Detlefs-Printezis refinement of |
|
50 // Boehm-Demers-Schenker) |
|
51 // |
46 // |
52 // The system configurations currently allowed are: |
47 // The system configuration currently allowed is: |
53 // |
48 // |
54 // DefNewGeneration + TenuredGeneration |
49 // DefNewGeneration + TenuredGeneration |
55 // |
|
56 // ParNewGeneration + ConcurrentMarkSweepGeneration |
|
57 // |
50 // |
58 |
51 |
59 class DefNewGeneration; |
52 class DefNewGeneration; |
60 class GCMemoryManager; |
53 class GCMemoryManager; |
61 class GenerationSpec; |
54 class GenerationSpec; |
120 |
113 |
121 public: |
114 public: |
122 // The set of possible generation kinds. |
115 // The set of possible generation kinds. |
123 enum Name { |
116 enum Name { |
124 DefNew, |
117 DefNew, |
125 ParNew, |
|
126 MarkSweepCompact, |
118 MarkSweepCompact, |
127 ConcurrentMarkSweep, |
|
128 Other |
119 Other |
129 }; |
120 }; |
130 |
121 |
131 enum SomePublicConstants { |
122 enum SomePublicConstants { |
132 // Generations are GenGrain-aligned and have size that are multiples of |
123 // Generations are GenGrain-aligned and have size that are multiples of |
154 // Space inquiries (results in bytes) |
145 // Space inquiries (results in bytes) |
155 size_t initial_size(); |
146 size_t initial_size(); |
156 virtual size_t capacity() const = 0; // The maximum number of object bytes the |
147 virtual size_t capacity() const = 0; // The maximum number of object bytes the |
157 // generation can currently hold. |
148 // generation can currently hold. |
158 virtual size_t used() const = 0; // The number of used bytes in the gen. |
149 virtual size_t used() const = 0; // The number of used bytes in the gen. |
159 virtual size_t used_stable() const; // The number of used bytes for memory monitoring tools. |
|
160 virtual size_t free() const = 0; // The number of free bytes in the gen. |
150 virtual size_t free() const = 0; // The number of free bytes in the gen. |
161 |
151 |
162 // Support for java.lang.Runtime.maxMemory(); see CollectedHeap. |
152 // Support for java.lang.Runtime.maxMemory(); see CollectedHeap. |
163 // Returns the total number of bytes available in a generation |
153 // Returns the total number of bytes available in a generation |
164 // for the allocation of objects. |
154 // for the allocation of objects. |