Fully featured low overhead profiler for Java EE and Java SE platforms.
Easy-to-use performance and memory .NET profiler for Windows, Linux and macOS.
Secure and easy profiling in cloud, containers and clustered environments.
Performance monitoring and profiling of Jenkins, Bamboo, TeamCity, Gradle, Maven, Ant and JUnit.

Memory snapshot

Memory management is a critical component of modern software development, and this is particularly true in .NET that is often used in large-scale, complex applications. In .NET, memory snapshots offer a way to capture the state of all objects and classes at a specific point in time.

What is a memory snapshot?

A memory snapshot is essentially a dump of all objects, classes, and their interrelationships in a running .NET application. These dumps can then be analyzed to identify memory leaks, inspect the object hierarchy, or even understand the execution state at that time.

Information contained in a memory snapshot

1) Memory snapshot is a dump of all objects and classes

When you capture a memory snapshot, you are taking a 'photograph' of the .NET heap memory. It records all the objects that have been instantiated, their states, and classes involved. This is incredibly useful for debugging as you can inspect this snapshot to understand exactly what was in memory at that point in time.

2) It contains graph of all objects

The memory snapshot includes a graph that represents how objects reference each other. This object graph provides a way to visualize the relationships between objects and can be essential for understanding how data flows through your application. For example, you can find out which objects are being held in memory due to references, thereby leading to potential memory leaks.

3) It contain values of primitive fields

While a basic snapshot will give you the object and class structures, it can also be configured to include the values of primitive fields (such as int, boolean, char, etc.) within those objects. This means that you can inspect the actual data within the objects, not just their structure. By looking at the state of these primitive fields, you may be able to identify inconsistencies or anomalies that could be the root cause of bugs.

4) It can contain optional information about where objects were allocated

Another optional feature is allocation profiling. This provides information about where in the code each object was allocated. Knowing the allocation site can be extremely useful for debugging purposes, especially for finding memory leaks or understanding complex object lifecycles.

Comparing memory snapshots

Lear more how to compare memory snapshots.

YourKit uses cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content, to analyze our website traffic, and to understand where our visitors are coming from.

By browsing our website, you consent to our use of cookies and other tracking technologies in accordance with the Privacy Policy.