Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge foreign-abi #152

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -59,7 +59,7 @@
static {
try {
var lookup = MethodHandles.lookup();
MH_ALLOC_BUFFER = lookup.findStatic(MemorySegment.class, "allocateNative",
MH_ALLOC_BUFFER = lookup.findStatic(SharedUtils.class, "allocateNative",
methodType(MemorySegment.class, MemoryLayout.class));
MH_BASEADDRESS = lookup.findVirtual(MemorySegment.class, "baseAddress",
methodType(MemoryAddress.class));
@@ -70,6 +70,11 @@
}
}

// workaround for https://bugs.openjdk.java.net/browse/JDK-8239083
private static MemorySegment allocateNative(MemoryLayout layout) {
return MemorySegment.allocateNative(layout);
}

/**
* Align the specified type from a given address
* @return The address the data should be at based on alignment requirement
ProTip! Use n and p to navigate between commits in a pull request.