Class AllocatorConfig.Builder

  • Enclosing class:
    AllocatorConfig

    public static class AllocatorConfig.Builder
    extends java.lang.Object
    The AllocatorConfig Builder.
    • Constructor Detail

      • Builder

        public Builder()
        Instantiates a new AllocatorConfig.Builder.
    • Method Detail

      • setTrimOnReset

        public AllocatorConfig.Builder setTrimOnReset​(boolean trimOnReset)
        Sets whether memory is freed when the allocator is reset. Should be true unless the allocator will be re-used by multiple player instances.
        Parameters:
        trimOnReset - the trim on reset
        Returns:
        the builder instance
        See Also:
        DefaultAllocator
      • setIndividualAllocationSize

        public AllocatorConfig.Builder setIndividualAllocationSize​(int individualAllocationSize)
        Sets the length of each individual Allocation.
        Parameters:
        individualAllocationSize - the individual allocation size
        Returns:
        the builder instance
        See Also:
        DefaultAllocator
      • setInitialAllocationCount

        public AllocatorConfig.Builder setInitialAllocationCount​(int initialAllocationCount)
        Sets the number of allocations to create up front.
        Parameters:
        initialAllocationCount - the initial allocation count
        Returns:
        the builder instance
        See Also:
        DefaultAllocator