Package org.jruby.ext.ffi
Class NoImplFactory
java.lang.Object
org.jruby.ext.ffi.Factory
org.jruby.ext.ffi.NoImplFactory
An instance of Factory that is used when no FFI implementation can be found.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintalignmentOf(NativeType type) allocateDirectMemory(Ruby runtime, int size, boolean clear) Allocates memory on the native C heap and wraps it in aMemoryIOaccessor.allocateDirectMemory(Ruby runtime, int size, int align, boolean clear) Allocates memory on the native C heap and wraps it in aMemoryIOaccessor.allocateTransientDirectMemory(Ruby runtime, int size, int align, boolean clear) Allocates transient native memory (not from C heap) and wraps it in aMemoryIOaccessor.voidinit(Ruby runtime, RubyModule ffi) Registers FFI ruby classes/modulesnewFunction(Ruby runtime, Pointer address, CallbackInfo cbInfo) intsizeOf(NativeType type) wrapDirectMemory(Ruby runtime, long address) Wraps a native C memory address in aMemoryIOaccessor.Methods inherited from class org.jruby.ext.ffi.Factory
getInstance
-
Constructor Details
-
NoImplFactory
-
-
Method Details
-
init
Description copied from class:FactoryRegisters FFI ruby classes/modules -
allocateDirectMemory
Description copied from class:FactoryAllocates memory on the native C heap and wraps it in aMemoryIOaccessor.- Specified by:
allocateDirectMemoryin classFactory- Parameters:
size- The number of bytes to allocate.clear- If the memory should be cleared.- Returns:
- A new
AllocatedDirectMemoryIO.
-
allocateDirectMemory
Description copied from class:FactoryAllocates memory on the native C heap and wraps it in aMemoryIOaccessor.- Specified by:
allocateDirectMemoryin classFactory- Parameters:
size- The number of bytes to allocate.align- The minimum alignment of the memoryclear- If the memory should be cleared.- Returns:
- A new
AllocatedDirectMemoryIO.
-
allocateTransientDirectMemory
Description copied from class:FactoryAllocates transient native memory (not from C heap) and wraps it in aMemoryIOaccessor.- Specified by:
allocateTransientDirectMemoryin classFactory- Parameters:
size- The number of bytes to allocate.align- The minimum alignment of the memoryclear- If the memory should be cleared.- Returns:
- A new
AllocatedDirectMemoryIO.
-
wrapDirectMemory
Description copied from class:FactoryWraps a native C memory address in aMemoryIOaccessor.- Specified by:
wrapDirectMemoryin classFactory- Parameters:
address- The native address to wrap.- Returns:
- A new
MemoryIO.
-
getCallbackManager
- Specified by:
getCallbackManagerin classFactory
-
newFunction
- Specified by:
newFunctionin classFactory
-
sizeOf
-
alignmentOf
- Specified by:
alignmentOfin classFactory
-