-
public class AllocatorConfig.Builder
The AllocatorConfig Builder.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
trimOnReset
private int
individualAllocationSize
private int
initialAllocationCount
-
Constructor Summary
Constructors Constructor Description AllocatorConfig.Builder()
Instantiates a new AllocatorConfig.Builder.
-
Method Summary
Modifier and Type Method Description AllocatorConfig.Builder
setTrimOnReset(boolean trimOnReset)
Sets whether memory is freed when the allocator is reset. AllocatorConfig.Builder
setIndividualAllocationSize(int individualAllocationSize)
Sets the length of each individual Allocation. AllocatorConfig.Builder
setInitialAllocationCount(int initialAllocationCount)
Sets the number of allocations to create up front. AllocatorConfig
build()
Builds the AllocatorConfig. -
-
Method Detail
-
setTrimOnReset
AllocatorConfig.Builder setTrimOnReset(boolean trimOnReset)
Sets whether memory is freed when the allocator is reset. Should be true unlessthe allocator will be re-used by multiple player instances.
- Parameters:
trimOnReset
- the trim on reset
-
setIndividualAllocationSize
AllocatorConfig.Builder setIndividualAllocationSize(int individualAllocationSize)
Sets the length of each individual Allocation.
- Parameters:
individualAllocationSize
- the individual allocation size
-
setInitialAllocationCount
AllocatorConfig.Builder setInitialAllocationCount(int initialAllocationCount)
Sets the number of allocations to create up front.
- Parameters:
initialAllocationCount
- the initial allocation count
-
build
AllocatorConfig build()
Builds the AllocatorConfig.
-
-
-
-