comparison src/share/vm/memory/allocation.hpp @ 3939:f6f3bb0ee072

7088955: add C2 IR support to the SA Reviewed-by: kvn
author never
date Sun, 11 Sep 2011 14:48:24 -0700
parents 2a3da7eaf4a6
children d2a62e0f25eb
comparison
equal deleted inserted replaced
3938:e6b1331a51d2 3939:f6f3bb0ee072
149 149
150 150
151 //------------------------------Chunk------------------------------------------ 151 //------------------------------Chunk------------------------------------------
152 // Linked list of raw memory chunks 152 // Linked list of raw memory chunks
153 class Chunk: public CHeapObj { 153 class Chunk: public CHeapObj {
154 friend class VMStructs;
155
154 protected: 156 protected:
155 Chunk* _next; // Next Chunk in list 157 Chunk* _next; // Next Chunk in list
156 const size_t _len; // Size of this Chunk 158 const size_t _len; // Size of this Chunk
157 public: 159 public:
158 void* operator new(size_t size, size_t length); 160 void* operator new(size_t size, size_t length);
198 class Arena: public CHeapObj { 200 class Arena: public CHeapObj {
199 protected: 201 protected:
200 friend class ResourceMark; 202 friend class ResourceMark;
201 friend class HandleMark; 203 friend class HandleMark;
202 friend class NoHandleMark; 204 friend class NoHandleMark;
205 friend class VMStructs;
206
203 Chunk *_first; // First chunk 207 Chunk *_first; // First chunk
204 Chunk *_chunk; // current chunk 208 Chunk *_chunk; // current chunk
205 char *_hwm, *_max; // High water mark and max in current chunk 209 char *_hwm, *_max; // High water mark and max in current chunk
206 void* grow(size_t x); // Get a new Chunk of at least size x 210 void* grow(size_t x); // Get a new Chunk of at least size x
207 NOT_PRODUCT(size_t _size_in_bytes;) // Size of arena (used for memory usage tracing) 211 NOT_PRODUCT(size_t _size_in_bytes;) // Size of arena (used for memory usage tracing)