# Mimalloc allocator example

> Inspect the usage reports of the mimalloc allocator.

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](/engine/6000.5/manual/scripting/debugging-and-diagnostics/log-files.md) page.

You can enable or disable the mimalloc allocator in the Memory Settings window. For more information, refer to [Native memory allocators reference](/engine/6000.5/manual/analysis/performance-memory/native-memory/allocator-reference.md).

## Example usage report

A mimalloc report displays debug statistics about the scene. The following example reserved 1.0 GiB of virtual address space for the heap, of which \~66.3 MiB was 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 allocators reference](/engine/6000.5/manual/analysis/performance-memory/native-memory/allocator-reference.md)
* [Mimalloc documentation](https://microsoft.github.io/mimalloc/index.html)
* [Memory Profiler module](/engine/6000.5/manual/analysis/profiler/visualizing-data/memory.md)
* [Job system overview](/engine/6000.5/manual/scripting/optimization/job-system.md)
