Home / Blog / All you need to know about memory profiling in Unreal Engine

All you need to know about memory profiling in Unreal Engine

At PixelAnt Games, we support releasing games on platforms such as the Nintendo Switch or Xbox Series S, which have limited memory resources compared to other platforms (3.2 GB and 8 GB, respectively). For modern games, it’s crucial to fit within the target hardware specifications because if the application runs out of memory, it will crash, which is unacceptable for both users and the certification process.

Let’s explore how we can identify what’s consuming all that memory.

Preparing the Environment

It’s always best to measure performance and memory usage in an environment as close to the target platform as possible. That’s why memory consumption should be analyzed in a build running on the actual hardware, not in the editor.

Use the Test build configuration as your first choice, Shipping for final checks, and Development when you need access to specific tools only available in that configuration.

Tools

Unreal Engine provides a variety of tools that can help with memory profiling.

High-level overview:

Stat unit, stat memory – the quickest way to get an overview of memory consumption

Memreport (-full) – detailed breakdown of memory usage dumped to a text file. It’s just a group of commands that you can run individually, its definition is in BaseEngine.ini

Memory Insights – a powerful tool that keeps improving with each engine version. It shows a memory usage overview and can also track individual allocations with its call stack and categories. Remember to run the game with -trace=default, memory-statnamedevents

Low-Level Memory Tracker (LLM) – Provides a more detailed view of memory, including allocations made by the OS. Enable it by running the game with -llm

Note: It’s not enabled by default in the Test configuration. Search for ALLOW_LOW_LEVEL_MEM_TRACKER_IN_TEST in the codebase.

Statistics – A lesser-known but very useful editor tool. Prepare a cooked build beforehand to view stats for a specific platform. Access it via Tools > Audit > Statistics

Focusing on Specific Assets:

Size Map – allows quick review of whether the asset has any big, hard references

obj list class=[CLASS_NAME] – lists all objects with the provided class name. Used by MemReport.

obj refs name=[ASSET_NAME] – shows references that keep the asset loaded. Useful to track dangling references.

Tools Outside Unreal Engine:

Platform-specific tools – Console vendors (e.g., Sony, Microsoft, Nintendo) offer proprietary memory profilers that are very effective.

MemPro – A commercial memory profiler that works with Unreal Engine on many platforms

………………………………………………………..

Useful links:

Author

Sylwester Służałek

Senior Software Engineer

Porting the huge, 3D-scanned world of Chernobylite to the limited hardware capabilities of the Nintendo Switch was a challenging task. This talk will explain how we successfully preserved the original gameplay experience by implementing effective optimizations and smart workarounds. Achieving this required not only a solid technical approach but also clear planning and robust risk management. Most of the solutions presented are platform-agnostic and can be applied to any Unreal Engine project.

See more posts by this author

Looking for a proven work-for-hire team?

Get in touch to find out how we can support your game!

Hi! We use cookies and similar technologies to better know you and improve your experience with our website.
You can find out more by reading our Privacy Policy.