An open API service indexing awesome lists of open source software.

https://github.com/over-run/native-list

Native list is a resizable array backed by memory segment.
https://github.com/over-run/native-list

java project-panama

Last synced: 9 days ago
JSON representation

Native list is a resizable array backed by memory segment.

Awesome Lists containing this project

README

          

# Native List

Native list is a resizable array backed by `MemorySegment`.

## Usage

```java
void main() {
try (var list = new IntNativeList(ListAllocator::ofConfinedArena)) {
list.add(42);
list.add(43);
assertEquals(42, list.get(0));
assertEquals(43, list.get(1));
} // the list is automatically released
}
```

Check [wiki](https://github.com/Over-Run/native-list/wiki) for details.

## Import as Dependency

This library requires JDK 25.

- Maven coordinate: `io.github.over-run:native-list`
- Version: ![Maven Central Version](https://img.shields.io/maven-central/v/io.github.over-run/native-list)

Maven:

```xml

io.github.over-run
native-list
${nativeListVersion}

```

Gradle:

```kotlin
dependencies {
implementation("io.github.over-run:native-list:${nativeListVersion}")
}
```