Skip to main content
  • 产品
  • Evaluate our Software
  • 下载
  • Free Utilities
  • 购买
  • 支持
  • 关于我们
  • Search
    • Contact Us
    • Forum
    • Knowledge Base
    • Newsletter
    • RSS
  •   工作机会
  •   视频
  •   永续性
  • 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

全球总部

德国: SEGGER Microcontroller GmbH

地址: Ecolab-Allee 5
40789 Monheim am Rhein, Germany
电邮: info@segger.com
电话: +49-2173-99312-0
传真: +49-2173-99312-28

网点分布

中国:哲戈微系统科技(上海)有限公司

地址: 中国上海市闵行区秀涟路133号
大虹桥国际A 栋218室
邮编201199
电邮: china@segger.com
电话: +86-133-619-907-60

通过ISO 9001认证

ISO 9001

30多年的嵌入式行业经验

First-class embedded software tools since 1992
  • 版本说明
  • 免责声明
  • 隐私策略
  • 沪ICP备2022005181号
  • 沪公网安备 31011202014525号
© 2025 SEGGER - 版权所有.

您即将离开 segger.cn 而访问境外网站,是否继续?