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>
pointers
Keep 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.Pointer
apply(NativeSizeT numberOfObjects, NativeSizeT size)
Allocate memory.
-
-
-
Method Detail
-
apply
public com.sun.jna.Pointer apply(NativeSizeT numberOfObjects, NativeSizeT size)
Allocate memory.- Specified by:
apply
in 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.
-
-