Skip to content

Commit 14be931

Browse files
committed
MemorySession has been replaced by Arena and SegmentScope
1 parent 854a888 commit 14be931

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/org/purejava/linux/MemoryAllocator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
package org.purejava.linux;
22

33
import java.lang.foreign.MemorySegment;
4-
import java.lang.foreign.MemorySession;
4+
import java.lang.foreign.SegmentScope;
55

66
public class MemoryAllocator {
77
public static MemorySegment ALLOCATE_FOR(String str) {
88
return RuntimeHelper.CONSTANT_ALLOCATOR.allocateUtf8String(str);
99
}
1010

11-
public static MemorySegment ALLOCATE_CALLBACK_FOR(GCallback cb, MemorySession session) {
12-
return GCallback.allocate(cb, session);
11+
public static MemorySegment ALLOCATE_CALLBACK_FOR(GCallback cb, SegmentScope scope) {
12+
return GCallback.allocate(cb, scope);
1313
}
1414

1515
public static boolean isLoadedNativeLib() {

0 commit comments

Comments
 (0)