comparison src/share/vm/utilities/array.hpp @ 12319:de059a14e159

8022187: Missing ResourceMark crash when assertion using FormatBufferResource fails Summary: Uses stack for the format buffer instead of resource memory Reviewed-by: kvn, coleenp
author zgu
date Tue, 01 Oct 2013 08:54:05 -0400
parents 9758d9f36299
children 26c3b944dc35
comparison
equal deleted inserted replaced
12315:c1fbf21c7397 12319:de059a14e159
351 } 351 }
352 352
353 // sort the array. 353 // sort the array.
354 bool contains(const T& x) const { return index_of(x) >= 0; } 354 bool contains(const T& x) const { return index_of(x) >= 0; }
355 355
356 T at(int i) const { assert(i >= 0 && i< _length, err_msg_res("oob: 0 <= %d < %d", i, _length)); return _data[i]; } 356 T at(int i) const { assert(i >= 0 && i< _length, err_msg("oob: 0 <= %d < %d", i, _length)); return _data[i]; }
357 void at_put(const int i, const T& x) { assert(i >= 0 && i< _length, err_msg_res("oob: 0 <= %d < %d", i, _length)); _data[i] = x; } 357 void at_put(const int i, const T& x) { assert(i >= 0 && i< _length, err_msg("oob: 0 <= %d < %d", i, _length)); _data[i] = x; }
358 T* adr_at(const int i) { assert(i >= 0 && i< _length, err_msg_res("oob: 0 <= %d < %d", i, _length)); return &_data[i]; } 358 T* adr_at(const int i) { assert(i >= 0 && i< _length, err_msg("oob: 0 <= %d < %d", i, _length)); return &_data[i]; }
359 int find(const T& x) { return index_of(x); } 359 int find(const T& x) { return index_of(x); }
360 360
361 T at_acquire(const int which) { return OrderAccess::load_acquire(adr_at(which)); } 361 T at_acquire(const int which) { return OrderAccess::load_acquire(adr_at(which)); }
362 void release_at_put(int which, T contents) { OrderAccess::release_store(adr_at(which), contents); } 362 void release_at_put(int which, T contents) { OrderAccess::release_store(adr_at(which), contents); }
363 363