8037958: ConcurrentMark::cleanup leaks BitMaps if VerifyDuringGC is enabled
Allocate temporary BitMaps in the VMThread's resource area
Reviewed-by: stefank, sjohanss
diff --git a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
index f9532a2..3c52610 100644
--- a/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
+++ b/hotspot/src/share/vm/gc_implementation/g1/concurrentMark.cpp
@@ -2035,8 +2035,8 @@
// that calculated by walking the marking bitmap.
// Bitmaps to hold expected values
- BitMap expected_region_bm(_region_bm.size(), false);
- BitMap expected_card_bm(_card_bm.size(), false);
+ BitMap expected_region_bm(_region_bm.size(), true);
+ BitMap expected_card_bm(_card_bm.size(), true);
G1ParVerifyFinalCountTask g1_par_verify_task(g1h,
&_region_bm,