Skip to main content
  • Products
  • Evaluate our Software
  • Downloads
  • Free Utilities
  • Purchase
  • Support
  • About Us
  • Blog
  • Forum
  • Search
    • Contact Us
    • Forum
    • Knowledge Base
    • Web Shop
    • Newsletter
    • RSS
  •   Jobs
  •   Videos
  •   Blog
  •   Sustainability
  • SystemView
  • Heap Monitoring
  • Technology
  • Licensing

Heap Monitoring

Dynamic-storage monitoring in applications.

Buy now
Downloads
Documentation
SEGGER SystemView
  1. 1.Overview
  2. 2.Heap metrics
  3. 3.User-defined tags
  4. 4.Named resources
  5. 5.Locating memory leaks
  6. 6.Instrumenting your own heaps
  7. 7.Get in touch with us

Overview

SystemView has the capability to monitor how applications use dynamic storage. This means that if your application uses the C or C++ heap, multiple custom heaps, or memory pool objects offered by an RTOS, you can trace how these are used over time. SystemView can monitor each of these within the same application, analyze their usage patterns, and present the collected information in a format that allows you to assess the load on your heap, identify potential memory leaks, track peak memory usage, and more.


Heap metrics

List of different heaps

SystemView maintains a model of the underlying heap, ensuring its state is always known. It records every active allocation and deallocation, calculates and tracks heap loading, and pairs allocation events with their corresponding deallocation events. In the Heap or Events window, you can navigate between allocation and matching deallocation events, view the lifetimes of each allocated memory block in the heap, and monitor both peak and current heap loading to ensure sufficient heap space for your needs.


User-defined tags

Each block of memory can be tagged, with the meaning of the tag left to the user's discretion. Typically, the tag identifies the application subsystem that owns the memory block within the heap (for example, a transmission layer, a protocol layer, or a database). This tag is maintained in the SystemView application, so it imposes no additional strain on the target. It is simply not stored in the target memory, aligning with SEGGER's philosophy of minimizing resource requirements on the target. You can use the tag as needed, filter based on it, and monitor blocks allocated for specific, application-defined purposes.


Named resources

Heaps and memory blocks can be given names, making it easier to identify specific blocks in the SystemView trace. These names are not stored on the target; instead, they are maintained within the SystemView application. SystemView ensures that any named resources in an API call or in the Resource column of a view display the human-friendly resource name.


Locating memory leaks

SystemView's heap monitoring makes it visually obvious when memory has been allocated but not freed. In many cases, this is perfectly acceptable—long-lived objects can persist for the entire lifetime of an application without needing to be freed. However, if you notice the peak load of the heap increasing over time, you are likely experiencing a memory leak, which can eventually cause problems and lead to a crash. With the heap monitor, it’s easy to track when objects are allocated along the timeline, providing useful clues as to where the leak may be occurring.


Instrumenting your own heaps

Adding instrumentation to your own heap-like objects is a snap!  You define the characteristics of the heap once, using SEGGER_SYSVIEW_HeapDefine() and monitor its use with SEGGER_SYSVIEW_HeapAlloc() and SEGGER_SYSVIEW_HeapFree(), which are naturally inserted into heap allocation code.

Get in touch with us

Have questions or need assistance? Our Embedded Experts are here to help!

Reach out to us for:

  • Licensing quotes
  • Technical inquiries
  • Project support

 

Contact us

Headquarters

SEGGER Microcontroller GmbH

Ecolab-Allee 5
40789 Monheim am Rhein, Germany
info@segger.com
Tel.: +49-2173-99312-0
Fax: +49-2173-99312-28

Locations

USA: SEGGER Microcontroller Systems LLC

Boston area
101 Suffolk Lane
Gardner, MA 01440, USA
us-east@segger.com
Tel.: +1-978-874-0299
Fax: +1-978-874-0599

Silicon Valley
Milpitas, CA 95035, USA
us-west@segger.com
Tel.: +1-408-767-4068

China: SEGGER Microcontroller China Co., Ltd.

Room 218, Block A, Dahongqiaoguoji
No. 133 Xiulian Road
Minhang District, Shanghai 201199, China
china@segger.com
Tel.: +86-133-619-907-60

ISO 9001 certified

ISO 9001

30+ years of experience

First-class embedded software tools since 1992
  • Imprint
  • Disclaimer
  • Privacy Policy
© 2025 SEGGER - All rights reserved.