105 void expand(size_t bytes);
106 bool expand_by(size_t bytes);
107 bool expand_to_reserved();
108
109 void shrink(size_t bytes);
110
111 void post_resize();
112
113 void initialize(ReservedSpace rs, size_t alignment,
114 const char* perf_data_name, int level);
115 void initialize_virtual_space(ReservedSpace rs, size_t alignment);
116 void initialize_work(const char* perf_data_name, int level);
117 void initialize_performance_counters(const char* perf_data_name, int level);
118
119 public:
120 // Initialize the generation.
121 PSOldGen(ReservedSpace rs, size_t initial_size, size_t min_size,
122 size_t max_size, const char* perf_data_name, int level);
123
124 MemRegion reserved() const { return _reserved; }
125 virtual size_t max_gen_size() { return _max_gen_size; }
126 size_t min_gen_size() { return _min_gen_size; }
127
128 // Returns limit on the maximum size of the generation. This
129 // is the same as _max_gen_size for PSOldGen but need not be
130 // for a derived class.
131 virtual size_t gen_size_limit();
132
133 bool is_in(const void* p) const {
134 return _virtual_space->contains((void *)p);
135 }
136
137 bool is_in_reserved(const void* p) const {
138 return reserved().contains(p);
139 }
140
141 MutableSpace* object_space() const { return _object_space; }
142 ObjectStartArray* start_array() { return &_start_array; }
143 PSVirtualSpace* virtual_space() const { return _virtual_space;}
144
145 // Has the generation been successfully allocated?
146 bool is_allocated();
147
148 // Size info
149 size_t capacity_in_bytes() const { return object_space()->capacity_in_bytes(); }
150 size_t used_in_bytes() const { return object_space()->used_in_bytes(); }
151 size_t free_in_bytes() const { return object_space()->free_in_bytes(); }
|
105 void expand(size_t bytes);
106 bool expand_by(size_t bytes);
107 bool expand_to_reserved();
108
109 void shrink(size_t bytes);
110
111 void post_resize();
112
113 void initialize(ReservedSpace rs, size_t alignment,
114 const char* perf_data_name, int level);
115 void initialize_virtual_space(ReservedSpace rs, size_t alignment);
116 void initialize_work(const char* perf_data_name, int level);
117 void initialize_performance_counters(const char* perf_data_name, int level);
118
119 public:
120 // Initialize the generation.
121 PSOldGen(ReservedSpace rs, size_t initial_size, size_t min_size,
122 size_t max_size, const char* perf_data_name, int level);
123
124 MemRegion reserved() const { return _reserved; }
125 size_t max_gen_size() const { return _max_gen_size; }
126 size_t min_gen_size() const { return _min_gen_size; }
127
128 bool is_in(const void* p) const {
129 return _virtual_space->contains((void *)p);
130 }
131
132 bool is_in_reserved(const void* p) const {
133 return reserved().contains(p);
134 }
135
136 MutableSpace* object_space() const { return _object_space; }
137 ObjectStartArray* start_array() { return &_start_array; }
138 PSVirtualSpace* virtual_space() const { return _virtual_space;}
139
140 // Has the generation been successfully allocated?
141 bool is_allocated();
142
143 // Size info
144 size_t capacity_in_bytes() const { return object_space()->capacity_in_bytes(); }
145 size_t used_in_bytes() const { return object_space()->used_in_bytes(); }
146 size_t free_in_bytes() const { return object_space()->free_in_bytes(); }
|