Class Memory

java.lang.Object
ca.spottedleaf.ioutil.buffer.Memory
All Implemented Interfaces:
AutoCloseable

public final class Memory extends Object implements AutoCloseable
  • Method Details

    • getSegment

      public MemorySegment getSegment()
    • allocateNative

      public static Memory allocateNative(long bytes, long alignment)
    • allocateHeap

      public static Memory allocateHeap(long bytes)
    • ofHeap

      public static Memory ofHeap(byte[] bytes)
    • ofSegment

      public static Memory ofSegment(MemorySegment segment)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable