317 // Set unconditionally in constantPoolCacheKlass::allocate() |
317 // Set unconditionally in constantPoolCacheKlass::allocate() |
318 volatile bool _is_conc_safe; |
318 volatile bool _is_conc_safe; |
319 |
319 |
320 // Sizing |
320 // Sizing |
321 debug_only(friend class ClassVerifier;) |
321 debug_only(friend class ClassVerifier;) |
|
322 public: |
322 int length() const { return _length; } |
323 int length() const { return _length; } |
|
324 private: |
323 void set_length(int length) { _length = length; } |
325 void set_length(int length) { _length = length; } |
324 |
326 |
325 static int header_size() { return sizeof(constantPoolCacheOopDesc) / HeapWordSize; } |
327 static int header_size() { return sizeof(constantPoolCacheOopDesc) / HeapWordSize; } |
326 static int object_size(int length) { return align_object_size(header_size() + length * in_words(ConstantPoolCacheEntry::size())); } |
328 static int object_size(int length) { return align_object_size(header_size() + length * in_words(ConstantPoolCacheEntry::size())); } |
327 int object_size() { return object_size(length()); } |
329 int object_size() { return object_size(length()); } |