public static class AllocatorConfig.Builder
extends java.lang.Object
| Constructor and Description |
|---|
Builder()
Instantiates a new AllocatorConfig.Builder.
|
| Modifier and Type | Method and Description |
|---|---|
AllocatorConfig |
build()
Builds the AllocatorConfig.
|
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.Builder |
setTrimOnReset(boolean trimOnReset)
Sets whether memory is freed when the allocator is reset.
|
public AllocatorConfig.Builder setTrimOnReset(boolean trimOnReset)
trimOnReset - the trim on resetDefaultAllocatorpublic AllocatorConfig.Builder setIndividualAllocationSize(int individualAllocationSize)
Allocation.individualAllocationSize - the individual allocation sizeDefaultAllocatorpublic AllocatorConfig.Builder setInitialAllocationCount(int initialAllocationCount)
initialAllocationCount - the initial allocation countDefaultAllocatorpublic AllocatorConfig build()