java.lang.Object
org.cloudburstmc.server.level.generator.standard.misc.IntArrayAllocator

public class IntArrayAllocator extends Object
A simple pooling allocator for int[]s.

Not thread-safe!

Author:
DaPorkchop_
  • Field Details

    • DEFAULT

      public static final net.daporkchop.lib.common.ref.Ref<IntArrayAllocator> DEFAULT
    • arenas

      protected final Deque<int[]>[] arenas
    • maxArenaSize

      protected final int maxArenaSize
  • Constructor Details

    • IntArrayAllocator

      public IntArrayAllocator(int maxArenaSize)
  • Method Details

    • get

      public int[] get(int minSize)
    • release

      public void release(@NonNull @lombok.NonNull int[] arr)