126
127 bool do_bit(size_t offset);
128 };
129
130 class DumpRegion {
131 private:
132 const char* _name;
133 char* _base;
134 char* _top;
135 char* _end;
136 uintx _max_delta;
137 bool _is_packed;
138 ReservedSpace* _rs;
139 VirtualSpace* _vs;
140
141 void commit_to(char* newtop);
142
143 public:
144 DumpRegion(const char* name, uintx max_delta = 0)
145 : _name(name), _base(NULL), _top(NULL), _end(NULL),
146 _max_delta(max_delta), _is_packed(false) {}
147
148 char* expand_top_to(char* newtop);
149 char* allocate(size_t num_bytes);
150
151 void append_intptr_t(intptr_t n, bool need_to_mark = false) NOT_CDS_RETURN;
152
153 char* base() const { return _base; }
154 char* top() const { return _top; }
155 char* end() const { return _end; }
156 size_t reserved() const { return _end - _base; }
157 size_t used() const { return _top - _base; }
158 bool is_packed() const { return _is_packed; }
159 bool is_allocatable() const {
160 return !is_packed() && _base != NULL;
161 }
162
163 void print(size_t total_bytes) const;
164 void print_out_of_space_msg(const char* failing_region, size_t needed_bytes);
165
166 void init(ReservedSpace* rs, VirtualSpace* vs);
167
168 void pack(DumpRegion* next = NULL);
169
|
126
127 bool do_bit(size_t offset);
128 };
129
130 class DumpRegion {
131 private:
132 const char* _name;
133 char* _base;
134 char* _top;
135 char* _end;
136 uintx _max_delta;
137 bool _is_packed;
138 ReservedSpace* _rs;
139 VirtualSpace* _vs;
140
141 void commit_to(char* newtop);
142
143 public:
144 DumpRegion(const char* name, uintx max_delta = 0)
145 : _name(name), _base(NULL), _top(NULL), _end(NULL),
146 _max_delta(max_delta), _is_packed(false),
147 _rs(NULL), _vs(NULL) {}
148
149 char* expand_top_to(char* newtop);
150 // Allocate with default alignment (SharedSpaceObjectAlignment)
151 char* allocate(size_t num_bytes);
152 // Allocate with an arbitrary alignment.
153 char* allocate(size_t num_bytes, size_t alignment);
154
155 void append_intptr_t(intptr_t n, bool need_to_mark = false) NOT_CDS_RETURN;
156
157 char* base() const { return _base; }
158 char* top() const { return _top; }
159 char* end() const { return _end; }
160 size_t reserved() const { return _end - _base; }
161 size_t used() const { return _top - _base; }
162 bool is_packed() const { return _is_packed; }
163 bool is_allocatable() const {
164 return !is_packed() && _base != NULL;
165 }
166
167 void print(size_t total_bytes) const;
168 void print_out_of_space_msg(const char* failing_region, size_t needed_bytes);
169
170 void init(ReservedSpace* rs, VirtualSpace* vs);
171
172 void pack(DumpRegion* next = NULL);
173
|