Native memory allocators reference
Reference for native memory allocator settings
Read time 4 minutesLast updated 3 days ago
You can control how native memory is allocated through using command line arguments, or using the settings in the Unity Editor (Edit > Project Settings > Memory Settings). For information on how to customize native memory allocators, refer to Customizing native memory allocators.

Project Settings > Memory Settings, showing a selection of Player memory settings
The following table contains information about each allocator setting, plus their command line arguments, and their default values:
Main Allocators
These allocators are the ones that Unity uses for most allocations.
Main Allocator
The primary allocator Unity uses for most allocations. It has the following settings:
Setting | Description | Command line argument | Default value |
|---|---|---|---|
| Main Thread Block Size | Block size of dedicated main thread allocator. This property is automatically disabled when you use mimalloc. | | |
| Shared Thread Block Size | Block size of shared thread allocator. This property is automatically disabled when you use mimalloc. | | |
| Mimalloc enabled | Uses mimalloc instead of the main thread and shared thread. | None | Enabled |
Gfx Allocator
The allocator Unity uses for CPU allocations related to the Gfx system. It has the following settings:
Setting | Description | Command line argument | Default value |
|---|---|---|---|
| Main Thread Block Size | Block size of the dedicated main thread Gfx allocator. | | |
| Shared Thread Block Size | Block size of the shared thread Gfx allocator. | | |
Other Allocators
Allocations used for type trees and the file cache. It has the following settings:
Setting | Description | Command line argument | Default value |
|---|---|---|---|
| File Cache Block Size | The file cache has its own allocator to avoid fragmentation. This is its block size. | | |
| Type Tree Block Size | The type trees have their own allocator to avoid fragmentation due to many small allocations. This is its block size. | | |
Shared Bucket Allocator
The bucket allocator shared between the main allocators. It has the following settings:
Setting | Description | Command line argument | Default value |
|---|---|---|---|
| Bucket Allocator Granularity | Step size for buckets in the shared allocator. | | |
| Bucket Allocator BucketCount | Number of bucket sizes. | | |
| Bucket Allocator Block Size | Size of memory blocks used for buckets. | | Editor: Player: |
| Bucket Allocator Block Count | Maximum number of blocks to be allocated. | | Editor: Player: |
Fast Per Thread Temporary Allocators
The Thread Local Storage (TLS) allocator that handles very short-lived allocations.
Allocator | Description | Command line argument | Default value (in bytes) |
|---|---|---|---|
| Main Thread Block Size | The initial size for the main thread stack. | | Editor: Player: |
| Job Worker Block Size | Size of each job worker in the Unity job system. | | |
| Background Job Worker Block Size | Size for each background worker. | | |
| Preload Block Size | The preload manager stack size. | | Editor: Player: |
| Audio Worker Block Size | Each audio worker thread's stack size. | | |
| Cloud Worker Block Size | Cloud worker threads stack size. | | |
| Gfx Thread Blocksize | The main render threads stack size. | | |
| GI Baking Blocksize | Each GI worker thread's stack size. | | |
| NavMesh Worker Block Size | Nav mesh worker threads stack size. | | |
Fast Thread Shared Temporary Allocators
Fast linear allocator for short lived allocations shared between threads.
Allocator | Description | Command line argument | Default value (in bytes) |
|---|---|---|---|
| Job Allocator Block Size | The round robin linear thread allocator Unity mainly uses for the job worker threads. | | |
| Background Job Allocator Block Size | The linear allocator for the background workers, such as asynchronous asset loading, that allows longer lived allocations. Unity rounds the block size up to the nearest power of two. This allocator only grows, and can reserve up to 512 times the rounded block size. For more information, refer to Reduce the memory footprint of the background job allocator. | | |
| Job Allocator Block Size on low memory platforms | Devices with less than 2 GB of physical memory use this size for both the job workers and the background jobs. Unity checks the device's physical memory when the application starts. Devices with 2 GB of memory or more use Job Allocator Block Size and Background Job Allocator Block Size, regardless of platform. | | |
Profiler Allocators
Allocators that Unity uses exclusively for the Profiler so that they don't interfere with the application's allocation patterns. They have the following settings:
Setting | Description | Command line argument | Default value |
|---|---|---|---|
| Profiler Block Size | The block size for the main part of the Profiler. | | |
| Editor Profiler Block Size | Block size for the Editor part of the Profiler. This isn't present in players. | | |
Shared Profiler Bucket Allocator
Shared bucket allocator for the Profiler and Editor Profiler allocators. Not present on low memory platforms. It has the following settings:
Setting | Description | Command line argument | Default value |
|---|---|---|---|
| Bucket Allocator Granularity | Step size for buckets in the shared allocator. | | |
| Bucket Allocator BucketCount | Number of bucket sizes. For example, if the value is 4, the sizes are 16 bytes, 32 bytes, 48 bytes, and 64 bytes. | | |
| Bucket Allocator Block Size | Size of memory blocks used for buckets. | | Editor: Player: |
| Bucket Allocator Block Count | Maximum number of blocks to be allocated. | | Editor: Player: |