comparison 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
comparison
equal deleted inserted replaced
10153:3c9b7ef92c61 10155:f258c5828eb8
537 // the resource area. 537 // the resource area.
538 538
539 #define NEW_RESOURCE_ARRAY(type, size)\ 539 #define NEW_RESOURCE_ARRAY(type, size)\
540 (type*) resource_allocate_bytes((size) * sizeof(type)) 540 (type*) resource_allocate_bytes((size) * sizeof(type))
541 541
542 #define NEW_RESOURCE_ARRAY_RETURN_NULL(type, size)\
543 (type*) resource_allocate_bytes((size) * sizeof(type), AllocFailStrategy::RETURN_NULL)
544
542 #define NEW_RESOURCE_ARRAY_IN_THREAD(thread, type, size)\ 545 #define NEW_RESOURCE_ARRAY_IN_THREAD(thread, type, size)\
543 (type*) resource_allocate_bytes(thread, (size) * sizeof(type)) 546 (type*) resource_allocate_bytes(thread, (size) * sizeof(type))
544 547
545 #define REALLOC_RESOURCE_ARRAY(type, old, old_size, new_size)\ 548 #define REALLOC_RESOURCE_ARRAY(type, old, old_size, new_size)\
546 (type*) resource_reallocate_bytes((char*)(old), (old_size) * sizeof(type), (new_size) * sizeof(type) ) 549 (type*) resource_reallocate_bytes((char*)(old), (old_size) * sizeof(type), (new_size) * sizeof(type) )