Version: Unity 6.0 (6000.0)
Language : English
Graphics project settings reference
Package Manager project settings reference

Memory project settings reference

You can control how Unity allocates native memory with the settings in Edit > Project Settings > Memory Settings, or with command-line arguments. 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
Project Settings > Memory Settings, showing a selection of Player memory settings

The following tables describe each allocator setting and its default value. To override these settings at startup on the command line, use the -memorysetup-* arguments. For a list of these arguments, refer to Native memory allocator arguments.

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 Default value
Main Thread Block Size Sets the block size of the dedicated main thread allocator. 16777216 bytes
Shared Thread Block Size Sets the block size of the shared thread allocator. 16777216 bytes

Gfx Allocator

The allocator Unity uses for CPU allocations related to the Gfx system. It has the following settings:

Setting Description Default value
Main Thread Block Size Sets the block size of the dedicated main thread Gfx allocator. 16777216 bytes
Shared Thread Block Size Sets the block size of the shared thread Gfx allocator. 16777216 bytes

Other Allocators

Allocations used for type trees and the file cache. It has the following settings:

Setting Description Default value
File Cache Block Size Sets the block size of the file cache allocator. The file cache has its own allocator to avoid fragmentation. 4194304 bytes
Type Tree Block Size Sets the block size of the type tree allocator. Type trees have their own allocator to avoid fragmentation from many small allocations. 2097152 bytes

Shared Bucket Allocator

The bucket allocator shared between the main allocators. It has the following settings:

Setting Description Default value
Bucket Allocator Granularity Sets the step size for buckets in the shared allocator. 16 bytes
Bucket Allocator BucketCount Sets the number of bucket sizes. 8
Bucket Allocator Block Size Sets the size of the memory blocks that Unity uses for buckets. Editor: 8388608 bytes
Player: 4194304 bytes
Bucket Allocator Block Count Sets the maximum number of blocks that Unity can allocate. Editor: 8
Player: 1

Fast Per Thread Temporary Allocators

The Thread Local Storage (TLS) allocator that handles very short-lived allocations.

Allocator Description Default value (in bytes)
Main Thread Block Size Sets the initial size of the main thread stack. Editor: 16777216
Player: 4194304
Job Worker Block Size Sets the size of each job worker in the Unity job system. 262144
Background Job Worker Block Size Sets the size of each background worker. 32768
Preload Block Size Sets the stack size of the preload manager. Editor: 33554432
Player: 262144
Audio Worker Block Size Sets the stack size of each audio worker thread. 65536
Cloud Worker Block Size Sets the stack size of the cloud worker threads. 32768
Gfx Thread Blocksize Sets the stack size of the main render thread. 262144
GI Baking Blocksize Sets the stack size of each GI worker thread. 262144
NavMesh Worker Block Size Sets the stack size of the NavMesh worker threads. 65536

Fast Thread Shared Temporary Allocators

Fast linear allocator for short lived allocations shared between threads.

Allocator Description Default value (in bytes)
Job Allocator Block Size Sets the block size of the round robin linear thread allocator that Unity mainly uses for the job worker threads. 2097152
Background Job Allocator Block Size Sets the block size of the linear allocator for 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. 1048576
Job Allocator Block Size on low memory platforms Sets the block size that devices with less than 2 GB of physical memory use 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. 262144

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 Default value
Profiler Block Size Sets the block size for the main part of the Profiler. 16777216
Editor Profiler Block Size Sets the block size for the Editor part of the Profiler. This isn’t present in players. 1048576 bytes

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 Default value
Bucket Allocator Granularity Sets the step size for buckets in the shared allocator. 16 bytes
Bucket Allocator BucketCount Sets the number of bucket sizes. For example, if the value is 4, the sizes are 16 bytes, 32 bytes, 48 bytes, and 64 bytes. 8
Bucket Allocator Block Size Sets the size of the memory blocks that Unity uses for buckets. Editor: 33554432 bytes
Player: 4194304 bytes
Bucket Allocator Block Count Sets the maximum number of blocks that Unity can allocate. Editor: 8
Player: 1

Additional resources

Graphics project settings reference
Package Manager project settings reference