Mercurial > hg > truffle
comparison src/share/vm/oops/instanceKlass.hpp @ 939:9eebd3ac74cf
6845368: large objects cause a crash or unexpected exception
Reviewed-by: jmasa, iveresov
author | jcoomes |
---|---|
date | Thu, 13 Aug 2009 16:22:45 -0700 |
parents | b37c246bf7ce |
children | 26b774d693aa |
comparison
equal
deleted
inserted
replaced
938:b37c246bf7ce | 939:9eebd3ac74cf |
---|---|
101 // ValueObjs embedded in klass. Describes where oops are located in instances of | 101 // ValueObjs embedded in klass. Describes where oops are located in instances of |
102 // this klass. | 102 // this klass. |
103 class OopMapBlock VALUE_OBJ_CLASS_SPEC { | 103 class OopMapBlock VALUE_OBJ_CLASS_SPEC { |
104 public: | 104 public: |
105 // Byte offset of the first oop mapped by this block. | 105 // Byte offset of the first oop mapped by this block. |
106 jushort offset() const { return _offset; } | 106 int offset() const { return _offset; } |
107 void set_offset(jushort offset) { _offset = offset; } | 107 void set_offset(int offset) { _offset = offset; } |
108 | 108 |
109 // Number of oops in this block. | 109 // Number of oops in this block. |
110 jushort count() const { return _count; } | 110 uint count() const { return _count; } |
111 void set_count(jushort count) { _count = count; } | 111 void set_count(uint count) { _count = count; } |
112 | 112 |
113 // sizeof(OopMapBlock) in HeapWords. | 113 // sizeof(OopMapBlock) in HeapWords. |
114 static const int size_in_words() { | 114 static const int size_in_words() { |
115 return align_size_up(int(sizeof(OopMapBlock)), HeapWordSize) >> | 115 return align_size_up(int(sizeof(OopMapBlock)), HeapWordSize) >> |
116 LogHeapWordSize; | 116 LogHeapWordSize; |
117 } | 117 } |
118 | 118 |
119 private: | 119 private: |
120 jushort _offset; | 120 int _offset; |
121 jushort _count; | 121 uint _count; |
122 }; | 122 }; |
123 | 123 |
124 class instanceKlass: public Klass { | 124 class instanceKlass: public Klass { |
125 friend class VMStructs; | 125 friend class VMStructs; |
126 public: | 126 public: |
444 // source debug extension | 444 // source debug extension |
445 symbolOop source_debug_extension() const { return _source_debug_extension; } | 445 symbolOop source_debug_extension() const { return _source_debug_extension; } |
446 void set_source_debug_extension(symbolOop n){ oop_store_without_check((oop*) &_source_debug_extension, (oop) n); } | 446 void set_source_debug_extension(symbolOop n){ oop_store_without_check((oop*) &_source_debug_extension, (oop) n); } |
447 | 447 |
448 // nonstatic oop-map blocks | 448 // nonstatic oop-map blocks |
449 static int nonstatic_oop_map_size(int oop_map_count) { | 449 static int nonstatic_oop_map_size(unsigned int oop_map_count) { |
450 return oop_map_count * OopMapBlock::size_in_words(); | 450 return oop_map_count * OopMapBlock::size_in_words(); |
451 } | 451 } |
452 int nonstatic_oop_map_count() const { | 452 unsigned int nonstatic_oop_map_count() const { |
453 return _nonstatic_oop_map_size / OopMapBlock::size_in_words(); | 453 return _nonstatic_oop_map_size / OopMapBlock::size_in_words(); |
454 } | 454 } |
455 int nonstatic_oop_map_size() const { return _nonstatic_oop_map_size; } | 455 int nonstatic_oop_map_size() const { return _nonstatic_oop_map_size; } |
456 void set_nonstatic_oop_map_size(int words) { | 456 void set_nonstatic_oop_map_size(int words) { |
457 _nonstatic_oop_map_size = words; | 457 _nonstatic_oop_map_size = words; |