mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-24 04:54:40 +02:00
8252196: ZGC: TestUncommit.java fails due to "Exception: Uncommitted too fast" again(2)
Reviewed-by: stefank, eosterlund
This commit is contained in:
parent
a9993f9464
commit
f972155d63
1 changed files with 2 additions and 2 deletions
|
@ -68,12 +68,12 @@ public class TestUncommit {
|
|||
|
||||
private static void test(int objectSize) throws Exception {
|
||||
final var beforeAlloc = capacity();
|
||||
final var timeBeforeAlloc = System.nanoTime();
|
||||
|
||||
// Allocate memory
|
||||
log("Allocating");
|
||||
allocate(objectSize);
|
||||
|
||||
final var timeAfterAlloc = System.nanoTime();
|
||||
final var afterAlloc = capacity();
|
||||
|
||||
// Reclaim memory
|
||||
|
@ -87,7 +87,7 @@ public class TestUncommit {
|
|||
|
||||
log("Uncommit started");
|
||||
final var timeUncommitStart = System.nanoTime();
|
||||
final var actualDelay = (timeUncommitStart - timeAfterAlloc) / 1_000_000;
|
||||
final var actualDelay = (timeUncommitStart - timeBeforeAlloc) / 1_000_000;
|
||||
|
||||
log("Waiting for uncommit to complete");
|
||||
while (capacity() > beforeAlloc) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue