To protect your data, the CISO officer has suggested users to enable GitLab 2FA as soon as possible.

NativeSupport.scala 521 Bytes
Newer Older
Kunshan Wang's avatar
Kunshan Wang committed
1
2
3
package uvm.refimpl.nat

import jnr.ffi.{ Runtime, Memory, Pointer }
Kunshan Wang's avatar
Kunshan Wang committed
4
import com.kenai.jffi.ClosureManager
5
import jnr.ffi.provider.jffi.NativeRuntime
Kunshan Wang's avatar
Kunshan Wang committed
6
7
8
9
10

/**
 * Holder of JNR-specific resources.
 */
object NativeSupport {
11
12
13
14
15
16
17
  // Force using NativeRuntime (although that's default).
  val jnrRuntime = NativeRuntime.getInstance
  val jnrMemoryManager = jnrRuntime.getMemoryManager
  val theMemory = jnrMemoryManager.newPointer(0L)
  
  // This is from JFFI, not JNR-FFI.
  val jffiClosureManager = ClosureManager.getInstance()
Kunshan Wang's avatar
Kunshan Wang committed
18
}