Version: Unity 6.6 Beta (6000.6)
Language : English
Native memory allocator examples
Dual thread allocator example

Mimalloc allocator example

This example uses the memory usage reports that Unity writes to the log when you close the Player or Unity Editor. To create this report, use the -log-memory-performance-stats command line argument. To find your project’s log files, follow the instructions on the log files page.

The mimalloc allocator is enabled by default. You can disable it in the Memory Settings window. For more information, refer to Native memory allocators reference.

Example usage report

A mimalloc report displays debug statistics about the sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More info
See in Glossary
. The following example reserved 1.0 GiB of virtual address space for the heap, of which ~66.3 MiB is committed to use.

heap stats:     peak       total     current       block      total#   
  reserved:     1.0 GiB     1.0 GiB     1.0 GiB                          
 committed:    66.3 MiB    66.3 MiB    66.3 MiB                          
     reset:     0      
    purged:     0      
   touched:     0           0           0                                ok
     pages:     9         161          3                                 not all freed
-abandoned:    52          72          52                                not all freed
 -reclaima:    20      
 -reclaimf:     0      
-reabandon:     0      
    -waits:     0      
 -extended:     0      
   -retire:     0      
    arenas:     1      
 -rollback:     0      
     mmaps:    19      
   commits:   371      
    resets:     0      
    purges:     0      
   guarded:     0      
   threads:    45          45           2                                not all freed
  searches:     1.0 avg
numa nodes:     1
   elapsed:     1.151 s
   process: user: 0.000 s, system: 0.000 s, faults: 0, rss: 66.3 MiB, commit: 66.3 MiB

Additional resources

Native memory allocator examples
Dual thread allocator example