Package it.unich.jgmp.nativelib
Interface ReallocFunc
- All Superinterfaces:
com.sun.jna.Callback
- All Known Implementing Classes:
AllocationMonitor.JGMPRealloc
public interface ReallocFunc
extends com.sun.jna.Callback
Custom reallocator function callback.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.sun.jna.Callback
com.sun.jna.Callback.UncaughtExceptionHandler
-
Field Summary
Fields inherited from interface com.sun.jna.Callback
FORBIDDEN_NAMES, METHOD_NAME
-
Method Summary
-
Method Details
-
invoke
Resize a previously allocated blockptr
ofold_size
bytes to benew_size
bytes. The block may be moved if necessary or if desired, and in that case the smaller ofold_size
andnew_size
bytes must be copied to the new location. The return value is a pointer to the resized block, that being the new location if moved or just ptr if not.ptr
is never NULL, it’s always a previously allocated block.new_size
may be bigger or smaller thanold_size
.
-