Module notzed.zcl
Package api

Interface Allocator

All Superinterfaces:
java.lang.AutoCloseable

public interface Allocator
extends java.lang.AutoCloseable
An interface to a 'pool' type allocator. That is, one where individual items cannot necessarily be freed.
  • Method Summary

    Modifier and Type Method Description
    jdk.incubator.foreign.MemoryAddress alloca​(long size)
    allocate memory
    jdk.incubator.foreign.MemorySegment allocs​(long size)
    Allocate bounded memory.
    void close()  
  • Method Details

    • close

      void close()
      Specified by:
      close in interface java.lang.AutoCloseable
    • alloca

      jdk.incubator.foreign.MemoryAddress alloca​(long size)
      allocate memory
    • allocs

      jdk.incubator.foreign.MemorySegment allocs​(long size)
      Allocate bounded memory. Whether you can close the segment depends on the implementation.