You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/ffm.txt
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -12,3 +12,8 @@ JF approach is to use JNI to pin arrays to avoid the excess copying back and for
12
12
13
13
Maybe the Valhalla project and value types may offer better performance in the future but still have no idea how Valhalla will work with the native systems (FFM/JNI).
14
14
See valhalla.txt for more info.
15
+
16
+
Notes:
17
+
- FFM upcalls (allows C code to call Java) are somewhat expensive so instead of creating them for each native invocation static upcalls are used instead
18
+
- in order for static upcalls to call virtual methods ThreadLocal storage is used to track which object invoked the native method
19
+
- one caveat to this is that callback methods can NOT call another native method
0 commit comments