Skip to main content

Heap Allocation Tracking

Prerequisite

This guide assumes you have already completed the minimal integration of the Memfault SDK. If you have not, please complete the appropriate Getting Started guide.

This feature of the Memfault SDK provides insight into heap allocations when viewing coredumps, for example:

Usage

Add or update the appropriate options to your system's prj.conf:

CONFIG_MEMFAULT_HEAP_STATS=y

# Setting a non-zero memory pool size is required for heap stats; otherwise
# k_malloc() will not be supported.
CONFIG_HEAP_MEM_POOL_SIZE=512