We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 08ed283 commit f15fe4cCopy full SHA for f15fe4c
src/main/java/org/purejava/linux/MemoryAllocator.java
@@ -1,9 +1,14 @@
1
package org.purejava.linux;
2
3
import java.lang.foreign.MemorySegment;
4
+import java.lang.foreign.MemorySession;
5
6
public class MemoryAllocator {
7
public static MemorySegment ALLOCATE_FOR(String str) {
8
return RuntimeHelper.CONSTANT_ALLOCATOR.allocateUtf8String(str);
9
}
10
+
11
+ public static MemorySegment ALLOCATE_CALLBACK_FOR(GCallback cb, MemorySession session) {
12
+ return GCallback.allocate(cb, session);
13
+ }
14
0 commit comments