diff src/share/vm/memory/allocation.hpp @ 10155:f258c5828eb8

8011773: Some tests on Interned String crashed JVM with OOM Summary: Instead of terminating the VM, throw OutOfMemoryError exceptions. Reviewed-by: coleenp, dholmes
author hseigel
date Mon, 29 Apr 2013 16:13:57 -0400
parents cc12becb22e7
children f9be75d21404 7ee0d5c53c78
line wrap: on
line diff
--- a/src/share/vm/memory/allocation.hpp	Fri Apr 26 08:40:24 2013 -0700
+++ b/src/share/vm/memory/allocation.hpp	Mon Apr 29 16:13:57 2013 -0400
@@ -539,6 +539,9 @@
 #define NEW_RESOURCE_ARRAY(type, size)\
   (type*) resource_allocate_bytes((size) * sizeof(type))
 
+#define NEW_RESOURCE_ARRAY_RETURN_NULL(type, size)\
+  (type*) resource_allocate_bytes((size) * sizeof(type), AllocFailStrategy::RETURN_NULL)
+
 #define NEW_RESOURCE_ARRAY_IN_THREAD(thread, type, size)\
   (type*) resource_allocate_bytes(thread, (size) * sizeof(type))