test/runtime/NMT/VirtualAllocCommitUncommitRecommit.java

Print this page
rev 6883 : 8055053: [TESTBUG] runtime/NMT/VirtualAllocCommitUncommitRecommit.java fails
Reviewed-by:


 144         wb.NMTUncommitMemory(addrA, commitSize);
 145         wb.NMTUncommitMemory(addrB, commitSize);
 146         wb.NMTUncommitMemory(addrC, commitSize);
 147         wb.NMTUncommitMemory(addrD, commitSize);
 148         wb.NMTUncommitMemory(addrE, commitSize);
 149         wb.NMTUncommitMemory(addrF, commitSize);
 150 
 151         output = new OutputAnalyzer(pb.start());
 152         output.shouldContain("Test (reserved=1024KB, committed=0KB)");
 153         if (has_nmt_detail) {
 154             output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*"
 155                     + Long.toHexString(addr + reserveSize)
 156                     + "\\] reserved 1024KB for Test");
 157         }
 158 
 159         // release
 160         wb.NMTReleaseMemory(addr, reserveSize);
 161         output = new OutputAnalyzer(pb.start());
 162         output.shouldNotContain("Test (reserved=");
 163         output.shouldNotMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*"
 164                 + Long.toHexString(addr + reserveSize) + "\\] reserved");
 165     }
 166 }


 144         wb.NMTUncommitMemory(addrA, commitSize);
 145         wb.NMTUncommitMemory(addrB, commitSize);
 146         wb.NMTUncommitMemory(addrC, commitSize);
 147         wb.NMTUncommitMemory(addrD, commitSize);
 148         wb.NMTUncommitMemory(addrE, commitSize);
 149         wb.NMTUncommitMemory(addrF, commitSize);
 150 
 151         output = new OutputAnalyzer(pb.start());
 152         output.shouldContain("Test (reserved=1024KB, committed=0KB)");
 153         if (has_nmt_detail) {
 154             output.shouldMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*"
 155                     + Long.toHexString(addr + reserveSize)
 156                     + "\\] reserved 1024KB for Test");
 157         }
 158 
 159         // release
 160         wb.NMTReleaseMemory(addr, reserveSize);
 161         output = new OutputAnalyzer(pb.start());
 162         output.shouldNotContain("Test (reserved=");
 163         output.shouldNotMatch("\\[0x[0]*" + Long.toHexString(addr) + " - 0x[0]*"
 164                 + Long.toHexString(addr + reserveSize) + "\\] reserved 1024KB for Test");
 165     }
 166 }