Mercurial > hg > truffle
comparison src/share/vm/oops/typeArrayKlass.cpp @ 876:1413494da700
6850957: Honor -XX:OnOutOfMemoryError when array size exceeds VM limit
Summary: call report_java_out_of_memory("Requested array size exceeds VM limit")
Reviewed-by: tbell, dholmes, alanb, ysr
Contributed-by: jeremymanson@google.com
author | martin |
---|---|
date | Mon, 29 Jun 2009 14:42:12 -0700 |
parents | 0fbdb4381b99 |
children | b5d78a3b8843 |
comparison
equal
deleted
inserted
replaced
875:6a93908f268f | 876:1413494da700 |
---|---|
78 t = (typeArrayOop)CollectedHeap::large_typearray_allocate(h_k, (int)size, length, CHECK_NULL); | 78 t = (typeArrayOop)CollectedHeap::large_typearray_allocate(h_k, (int)size, length, CHECK_NULL); |
79 } | 79 } |
80 assert(t->is_parsable(), "Don't publish unless parsable"); | 80 assert(t->is_parsable(), "Don't publish unless parsable"); |
81 return t; | 81 return t; |
82 } else { | 82 } else { |
83 report_java_out_of_memory("Requested array size exceeds VM limit"); | |
83 THROW_OOP_0(Universe::out_of_memory_error_array_size()); | 84 THROW_OOP_0(Universe::out_of_memory_error_array_size()); |
84 } | 85 } |
85 } else { | 86 } else { |
86 THROW_0(vmSymbols::java_lang_NegativeArraySizeException()); | 87 THROW_0(vmSymbols::java_lang_NegativeArraySizeException()); |
87 } | 88 } |