mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8208686: [AOT] JVMTI ResourceExhausted event repeated for same allocation
Reviewed-by: never, kvn, sspitsyn
This commit is contained in:
parent
2223e083ba
commit
548eb6860a
20 changed files with 348 additions and 141 deletions
|
@ -1201,14 +1201,7 @@ bool InstanceKlass::is_same_or_direct_interface(Klass *k) const {
|
|||
}
|
||||
|
||||
objArrayOop InstanceKlass::allocate_objArray(int n, int length, TRAPS) {
|
||||
if (length < 0) {
|
||||
THROW_MSG_0(vmSymbols::java_lang_NegativeArraySizeException(), err_msg("%d", length));
|
||||
}
|
||||
if (length > arrayOopDesc::max_array_length(T_OBJECT)) {
|
||||
report_java_out_of_memory("Requested array size exceeds VM limit");
|
||||
JvmtiExport::post_array_size_exhausted();
|
||||
THROW_OOP_0(Universe::out_of_memory_error_array_size());
|
||||
}
|
||||
check_array_allocation_length(length, arrayOopDesc::max_array_length(T_OBJECT), CHECK_NULL);
|
||||
int size = objArrayOopDesc::object_size(length);
|
||||
Klass* ak = array_klass(n, CHECK_NULL);
|
||||
objArrayOop o = (objArrayOop)Universe::heap()->array_allocate(ak, size, length,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue