Class RPmallocAllocator

  • All Implemented Interfaces:
    org.lwjgl.system.MemoryUtil.MemoryAllocator


    public class RPmallocAllocator
    extends java.lang.Object
    implements org.lwjgl.system.MemoryUtil.MemoryAllocator
    A MemoryUtil.MemoryAllocator implementation using the rpmalloc library.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      long aligned_alloc(long alignment, long size)
      Called by MemoryUtil.memAlignedAlloc(int, int).
      void aligned_free(long ptr)
      Called by MemoryUtil.memAlignedFree(java.nio.ByteBuffer).
      long calloc(long num, long size)
      Called by MemoryUtil.memCalloc(int, int).
      void free(long ptr)
      Called by MemoryUtil.memFree(java.nio.Buffer).
      long getAlignedAlloc()
      Returns a pointer to the aligned_alloc function.
      long getAlignedFree()
      Returns a pointer to the aligned_free function.
      long getCalloc()
      Returns a pointer to the calloc function.
      long getFree()
      Returns a pointer to the free function.
      long getMalloc()
      Returns a pointer to the malloc function.
      long getRealloc()
      Returns a pointer to the realloc function.
      long malloc(long size)
      Called by MemoryUtil.memAlloc(int).
      long realloc(long ptr, long size)
      Called by MemoryUtil.memRealloc(java.nio.ByteBuffer, int).
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RPmallocAllocator

        public RPmallocAllocator()
    • Method Detail

      • getMalloc

        public long getMalloc()
        Description copied from interface: org.lwjgl.system.MemoryUtil.MemoryAllocator
        Returns a pointer to the malloc function.
        Specified by:
        getMalloc in interface org.lwjgl.system.MemoryUtil.MemoryAllocator
      • getCalloc

        public long getCalloc()
        Description copied from interface: org.lwjgl.system.MemoryUtil.MemoryAllocator
        Returns a pointer to the calloc function.
        Specified by:
        getCalloc in interface org.lwjgl.system.MemoryUtil.MemoryAllocator
      • getRealloc

        public long getRealloc()
        Description copied from interface: org.lwjgl.system.MemoryUtil.MemoryAllocator
        Returns a pointer to the realloc function.
        Specified by:
        getRealloc in interface org.lwjgl.system.MemoryUtil.MemoryAllocator
      • getFree

        public long getFree()
        Description copied from interface: org.lwjgl.system.MemoryUtil.MemoryAllocator
        Returns a pointer to the free function.
        Specified by:
        getFree in interface org.lwjgl.system.MemoryUtil.MemoryAllocator
      • getAlignedAlloc

        public long getAlignedAlloc()
        Description copied from interface: org.lwjgl.system.MemoryUtil.MemoryAllocator
        Returns a pointer to the aligned_alloc function.
        Specified by:
        getAlignedAlloc in interface org.lwjgl.system.MemoryUtil.MemoryAllocator
      • getAlignedFree

        public long getAlignedFree()
        Description copied from interface: org.lwjgl.system.MemoryUtil.MemoryAllocator
        Returns a pointer to the aligned_free function.
        Specified by:
        getAlignedFree in interface org.lwjgl.system.MemoryUtil.MemoryAllocator
      • malloc

        public long malloc(long size)
        Description copied from interface: org.lwjgl.system.MemoryUtil.MemoryAllocator
        Called by MemoryUtil.memAlloc(int).
        Specified by:
        malloc in interface org.lwjgl.system.MemoryUtil.MemoryAllocator
      • calloc

        public long calloc(long num,
                           long size)
        Description copied from interface: org.lwjgl.system.MemoryUtil.MemoryAllocator
        Called by MemoryUtil.memCalloc(int, int).
        Specified by:
        calloc in interface org.lwjgl.system.MemoryUtil.MemoryAllocator
      • realloc

        public long realloc(long ptr,
                            long size)
        Description copied from interface: org.lwjgl.system.MemoryUtil.MemoryAllocator
        Called by MemoryUtil.memRealloc(java.nio.ByteBuffer, int).
        Specified by:
        realloc in interface org.lwjgl.system.MemoryUtil.MemoryAllocator
      • free

        public void free(long ptr)
        Description copied from interface: org.lwjgl.system.MemoryUtil.MemoryAllocator
        Called by MemoryUtil.memFree(java.nio.Buffer).
        Specified by:
        free in interface org.lwjgl.system.MemoryUtil.MemoryAllocator
      • aligned_alloc

        public long aligned_alloc(long alignment,
                                  long size)
        Description copied from interface: org.lwjgl.system.MemoryUtil.MemoryAllocator
        Called by MemoryUtil.memAlignedAlloc(int, int).
        Specified by:
        aligned_alloc in interface org.lwjgl.system.MemoryUtil.MemoryAllocator
      • aligned_free

        public void aligned_free(long ptr)
        Description copied from interface: org.lwjgl.system.MemoryUtil.MemoryAllocator
        Called by MemoryUtil.memAlignedFree(java.nio.ByteBuffer).
        Specified by:
        aligned_free in interface org.lwjgl.system.MemoryUtil.MemoryAllocator