< prev index next >

src/hotspot/share/cds/archiveUtils.hpp

Print this page

139 
140   bool do_bit(size_t offset);
141 };
142 
143 class DumpRegion {
144 private:
145   const char* _name;
146   char* _base;
147   char* _top;
148   char* _end;
149   uintx _max_delta;
150   bool _is_packed;
151   ReservedSpace* _rs;
152   VirtualSpace* _vs;
153 
154   void commit_to(char* newtop);
155 
156 public:
157   DumpRegion(const char* name, uintx max_delta = 0)
158     : _name(name), _base(nullptr), _top(nullptr), _end(nullptr),
159       _max_delta(max_delta), _is_packed(false) {}

160 
161   char* expand_top_to(char* newtop);
162   char* allocate(size_t num_bytes);
163 
164   void append_intptr_t(intptr_t n, bool need_to_mark = false) NOT_CDS_RETURN;
165 
166   char* base()      const { return _base;        }
167   char* top()       const { return _top;         }
168   char* end()       const { return _end;         }
169   size_t reserved() const { return _end - _base; }
170   size_t used()     const { return _top - _base; }
171   bool is_packed()  const { return _is_packed;   }
172   bool is_allocatable() const {
173     return !is_packed() && _base != nullptr;
174   }
175 
176   void print(size_t total_bytes) const;
177   void print_out_of_space_msg(const char* failing_region, size_t needed_bytes);
178 
179   void init(ReservedSpace* rs, VirtualSpace* vs);
180 
181   void pack(DumpRegion* next = nullptr);
182 

139 
140   bool do_bit(size_t offset);
141 };
142 
143 class DumpRegion {
144 private:
145   const char* _name;
146   char* _base;
147   char* _top;
148   char* _end;
149   uintx _max_delta;
150   bool _is_packed;
151   ReservedSpace* _rs;
152   VirtualSpace* _vs;
153 
154   void commit_to(char* newtop);
155 
156 public:
157   DumpRegion(const char* name, uintx max_delta = 0)
158     : _name(name), _base(nullptr), _top(nullptr), _end(nullptr),
159       _max_delta(max_delta), _is_packed(false),
160       _rs(NULL), _vs(NULL) {}
161 
162   char* expand_top_to(char* newtop);
163   char* allocate(size_t num_bytes, size_t alignment = 0);
164 
165   void append_intptr_t(intptr_t n, bool need_to_mark = false) NOT_CDS_RETURN;
166 
167   char* base()      const { return _base;        }
168   char* top()       const { return _top;         }
169   char* end()       const { return _end;         }
170   size_t reserved() const { return _end - _base; }
171   size_t used()     const { return _top - _base; }
172   bool is_packed()  const { return _is_packed;   }
173   bool is_allocatable() const {
174     return !is_packed() && _base != nullptr;
175   }
176 
177   void print(size_t total_bytes) const;
178   void print_out_of_space_msg(const char* failing_region, size_t needed_bytes);
179 
180   void init(ReservedSpace* rs, VirtualSpace* vs);
181 
182   void pack(DumpRegion* next = nullptr);
183 
< prev index next >