8134992: vm/gc/compact/Compact_InternedStrings_Strings failed due to a malloc() failure
Reviewed-by: mgerdin, brutisso
--- a/hotspot/src/share/vm/gc/shared/collectedHeap.cpp Thu Feb 25 01:55:45 2016 +0000
+++ b/hotspot/src/share/vm/gc/shared/collectedHeap.cpp Wed Feb 24 09:25:39 2016 +0100
@@ -405,7 +405,9 @@
oop CollectedHeap::new_store_pre_barrier(JavaThread* thread, oop new_obj) {
// If a previous card-mark was deferred, flush it now.
flush_deferred_store_barrier(thread);
- if (can_elide_initializing_store_barrier(new_obj)) {
+ if (can_elide_initializing_store_barrier(new_obj) ||
+ new_obj->is_typeArray()) {
+ // Arrays of non-references don't need a pre-barrier.
// The deferred_card_mark region should be empty
// following the flush above.
assert(thread->deferred_card_mark().is_empty(), "Error");