< prev index next >

test/micro/org/openjdk/bench/java/lang/foreign/pointers/Pointer.java

Print this page
@@ -76,11 +76,11 @@
          MemorySegment segment = allocator.allocate(type.layout());
          return new Pointer<>(segment);
      }
  
      public static <X> Pointer<X> allocate(NativeType<X> type, long size, SegmentAllocator allocator) {
-         MemorySegment segment = allocator.allocateArray(type.layout(), size);
+         MemorySegment segment = allocator.allocate(type.layout(), size);
          return new Pointer<>(segment);
      }
  
      public static <X> Pointer<X> wrap(NativeType<X> type, MemorySegment segment) {
          return new Pointer<>(segment);
< prev index next >