< prev index next >

src/hotspot/share/cds/archiveUtils.hpp

Print this page

125 
126   bool do_bit(size_t offset);
127 };
128 
129 class DumpRegion {
130 private:
131   const char* _name;
132   char* _base;
133   char* _top;
134   char* _end;
135   uintx _max_delta;
136   bool _is_packed;
137   ReservedSpace* _rs;
138   VirtualSpace* _vs;
139 
140   void commit_to(char* newtop);
141 
142 public:
143   DumpRegion(const char* name, uintx max_delta = 0)
144     : _name(name), _base(NULL), _top(NULL), _end(NULL),
145       _max_delta(max_delta), _is_packed(false) {}

146 
147   char* expand_top_to(char* newtop);

148   char* allocate(size_t num_bytes);


149 
150   void append_intptr_t(intptr_t n, bool need_to_mark = false);
151 
152   char* base()      const { return _base;        }
153   char* top()       const { return _top;         }
154   char* end()       const { return _end;         }
155   size_t reserved() const { return _end - _base; }
156   size_t used()     const { return _top - _base; }
157   bool is_packed()  const { return _is_packed;   }
158   bool is_allocatable() const {
159     return !is_packed() && _base != NULL;
160   }
161 
162   void print(size_t total_bytes) const;
163   void print_out_of_space_msg(const char* failing_region, size_t needed_bytes);
164 
165   void init(ReservedSpace* rs, VirtualSpace* vs);
166 
167   void pack(DumpRegion* next = NULL);
168 

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