mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
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:
parent
6a4aa00cc1
commit
2a692f80bf
6 changed files with 26 additions and 17 deletions
|
@ -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))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue