8011773: Some tests on Interned String crashed JVM with OOM

Instead of terminating the VM, throw OutOfMemoryError exceptions.

Reviewed-by: coleenp, dholmes
This commit is contained in:
Harold Seigel 2013-04-29 16:13:57 -04:00
parent 6a4aa00cc1
commit 2a692f80bf
6 changed files with 26 additions and 17 deletions

View file

@ -539,6 +539,9 @@ class ResourceObj ALLOCATION_SUPER_CLASS_SPEC {
#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))