Skip to content

Commit 9ff7f94

Browse files
committed
Prefer confined over shared Arena.
1 parent b20c557 commit 9ff7f94

4 files changed

Lines changed: 5 additions & 65 deletions

File tree

src/main/java21/com/evolvedbinary/jnibench/jmhbench/cache/MemorySegmentCache.java

Lines changed: 0 additions & 62 deletions
This file was deleted.

src/main/java25/com/evolvedbinary/jnibench/jmhbench/GetJNIBenchmarkJava25.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ public class GetJNIBenchmarkJava25 extends GetJNIBenchmark {
5656
ValueLayout.JAVA_INT,
5757
ValueLayout.ADDRESS,
5858
ValueLayout.ADDRESS,
59-
ValueLayout.JAVA_INT)))
59+
ValueLayout.JAVA_INT),
60+
Linker.Option.critical(false)))
6061
.orElseThrow();
6162

6263
}

src/main/java25/com/evolvedbinary/jnibench/jmhbench/PutJNIBenchmarkJava25.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ public class PutJNIBenchmarkJava25 extends PutJNIBenchmark {
5656
ValueLayout.JAVA_INT,
5757
ValueLayout.ADDRESS,
5858
ValueLayout.ADDRESS,
59-
ValueLayout.JAVA_INT)))
59+
ValueLayout.JAVA_INT),
60+
Linker.Option.critical(false)))
6061
.orElseThrow();
6162

6263
}

src/main/javaffm/com/evolvedbinary/jnibench/jmhbench/cache/MemorySegmentCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class MemorySegmentCache extends LinkedListAllocationCache<MemorySegment>
3737
private final Arena arena;
3838

3939
public MemorySegmentCache() {
40-
arena = Arena.ofShared();
40+
arena = Arena.ofConfined();
4141
}
4242

4343

0 commit comments

Comments
 (0)