Package org.ptolemy.fmi
Class FMULibrary.FMUAllocateMemory
- java.lang.Object
-
- org.ptolemy.fmi.FMULibrary.FMUAllocateMemory
-
- All Implemented Interfaces:
com.sun.jna.Callback,FMILibrary.FMICallbackAllocateMemory
- Enclosing interface:
- FMULibrary
public static class FMULibrary.FMUAllocateMemory extends java.lang.Object implements FMILibrary.FMICallbackAllocateMemory
Class for the allocate memory callback function.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Map<com.sun.jna.Pointer,com.sun.jna.Memory>pointersKeep references to memory that has been allocated and avoid problems with the memory being garbage collected.
-
Constructor Summary
Constructors Constructor Description FMUAllocateMemory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.sun.jna.Pointerapply(NativeSizeT numberOfObjects, NativeSizeT size)Allocate memory.
-
-
-
Method Detail
-
apply
public com.sun.jna.Pointer apply(NativeSizeT numberOfObjects, NativeSizeT size)
Allocate memory.- Specified by:
applyin interfaceFMILibrary.FMICallbackAllocateMemory- Parameters:
numberOfObjects- The number of objects to allocate.size- The size of the object in bytes.- Returns:
- a Pointer to the allocated memory.
-
-