6850957: Honor -XX:OnOutOfMemoryError when array size exceeds VM limit

Call report_java_out_of_memory("Requested array size exceeds VM limit")

Reviewed-by: tbell, dholmes, alanb, ysr
This commit is contained in:
Jeremy Manson 2009-06-29 14:42:12 -07:00 committed by Martin Buchholz
parent 08f5aeffc1
commit 28d4ad46aa
4 changed files with 4 additions and 0 deletions

View file

@ -39,6 +39,7 @@ objArrayOop objArrayKlass::allocate(int length, TRAPS) {
assert(a->is_parsable(), "Can't publish unless parsable");
return a;
} else {
report_java_out_of_memory("Requested array size exceeds VM limit");
THROW_OOP_0(Universe::out_of_memory_error_array_size());
}
} else {