Package it.unich.jgmp

Class AllocationMonitor.JGMPRealloc

  • All Implemented Interfaces:
    com.sun.jna.Callback, ReallocFunc
    Enclosing class:
    AllocationMonitor

    private static class AllocationMonitor.JGMPRealloc
    extends java.lang.Object
    implements ReallocFunc
    The custom reallocator.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface com.sun.jna.Callback

        com.sun.jna.Callback.UncaughtExceptionHandler
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) ReallocFuncByReference rfp  
      • Fields inherited from interface com.sun.jna.Callback

        FORBIDDEN_NAMES, METHOD_NAME
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.sun.jna.Pointer invoke​(com.sun.jna.Pointer ptr, SizeT old_size, SizeT new_size)
      Resize a previously allocated block ptr of old_size bytes to be new_size bytes.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • invoke

        public com.sun.jna.Pointer invoke​(com.sun.jna.Pointer ptr,
                                          SizeT old_size,
                                          SizeT new_size)
        Description copied from interface: ReallocFunc
        Resize a previously allocated block ptr of old_size bytes to be new_size bytes. The block may be moved if necessary or if desired, and in that case the smaller of old_size and new_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 than old_size.

        Specified by:
        invoke in interface ReallocFunc