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); } }