From c3fc36f9074f76573dc949fa32ee910fb3d3dad5 Mon Sep 17 00:00:00 2001 From: "Pascal S. de Kloe" Date: Sat, 2 Dec 2023 22:51:41 +0100 Subject: [PATCH] update to JDK-21 --- memory/pom.xml | 6 +++--- memory/src/main/java/com/activeviam/test/AddBenchmark.java | 4 ++-- memory/src/main/java/com/activeviam/test/SumBenchmark.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/memory/pom.xml b/memory/pom.xml index 54d3fd4..7453178 100644 --- a/memory/pom.xml +++ b/memory/pom.xml @@ -56,9 +56,9 @@ maven-compiler-plugin 3.10.1 - 20 - 20 - 20 + 21 + 21 + 21 diff --git a/memory/src/main/java/com/activeviam/test/AddBenchmark.java b/memory/src/main/java/com/activeviam/test/AddBenchmark.java index 74c710f..f61207a 100644 --- a/memory/src/main/java/com/activeviam/test/AddBenchmark.java +++ b/memory/src/main/java/com/activeviam/test/AddBenchmark.java @@ -69,8 +69,8 @@ public Data() { this.outputArrayFloat = new float[SIZE]; this.inputAddress = U.allocateMemory(8 * SIZE); this.outputAddress = U.allocateMemory(8 * SIZE); - this.inputSegment = MemorySegment.allocateNative(8*SIZE, MemorySession.global()); - this.outputSegment = MemorySegment.allocateNative(8*SIZE, MemorySession.global()); + this.inputSegment = Arena.global().allocate(8*SIZE, 8); + this.outputSegment = Arena.global().allocate(8*SIZE, 8); } } diff --git a/memory/src/main/java/com/activeviam/test/SumBenchmark.java b/memory/src/main/java/com/activeviam/test/SumBenchmark.java index 9aa7fcb..7bc2c12 100644 --- a/memory/src/main/java/com/activeviam/test/SumBenchmark.java +++ b/memory/src/main/java/com/activeviam/test/SumBenchmark.java @@ -59,7 +59,7 @@ public Data() { this.inputArray = new double[SIZE]; this.inputBuffer = ByteBuffer.allocateDirect(8 * SIZE); this.inputAddress = U.allocateMemory(8 * SIZE); - this.inputSegment = MemorySegment.allocateNative(8*SIZE, MemorySession.global()); + this.inputSegment = Arena.global().allocate(8*SIZE, 8); } }