Memory Manager Service Developer Guide#
About this Guide#
This guide provides comprehensive documentation for the Memory Manager service, a critical component of the Silicon Labs Platform SDK. It helps external developers and customers understand, configure, and successfully integrate memory management functionality into their embedded applications. Whether you're building wireless IoT devices, industrial automation systems, or battery-powered sensors, this guide will help you optimize your system's memory usage and minimize fragmentation using the Memory Manager service.
Audience#
Firmware developers integrating Silicon Labs services and peripherals
Application developers building solutions on Silicon Labs platforms
System integrators implementing custom embedded systems
Technical support engineers helping customers with implementation questions
Purpose#
The Memory Manager is a comprehensive platform-level software module that provides runtime memory allocation capabilities for Silicon Labs embedded systems. It complements the toolchain linker by managing RAM memory not allocated/partitioned by the linker, offering different constructs to help SDK software modules and applications build efficient and optimized RAM layouts.
The Memory Manager addresses common embedded system challenges including heap fragmentation, deterministic memory allocation, and efficient memory utilization. It provides multiple allocation strategies to accommodate different application requirements, from general-purpose dynamic allocation to real-time deterministic memory pools.
Key Benefits for External Developers#
Fragmentation Reduction: Long-term/short-term allocation strategy minimizes heap fragmentation
Deterministic Allocation: Memory pools provide guaranteed allocation timing for real-time applications
Thread Safety: Built-in critical section protection enables safe multi-threaded usage
Flexible Alignment: Configurable power-of-2 memory alignment (up to 512 bytes) for hardware-specific requirements
Comprehensive Monitoring: Statistics API provides runtime heap usage analysis and optimization insights
C++ Integration: Seamless integration with C++ applications through operator overloading
Retargeting System: Retargeting of standard C library functions malloc/free/calloc/realloc to the memory manager native ones
Platform Integration: Automatic initialization
Scope#
The Memory Manager service provides:
Dynamic allocation API with malloc/free/calloc/realloc functionality
Memory pool API for deterministic fixed-size block allocation
Dynamic reservation API for special block reservation scenarios
Statistics API for runtime memory usage monitoring
C++ integration with operator overloading support
Thread-safe operation for RTOS environments