Managing memory for efficient bug-free operation

As long as there have been embedded systems, the constrained resource nature of the typical design makes efficient, effective, and bug-free memory management a top priority. Because there is only so much memory to go around, much of a programmer’s time and effort is spent on coming up with better ways to move data and instructions into and out of memory quickly, efficiently and with a minimum of errors.

In “Mastering stack and heap for system reliability,” a three part series by Anders Lundgren and Lotta Firmanson, the authors take you step by step through the techniques for allocating stack and heap in ways that ensure you’ll have a robust design that optimizes use of memory resources.

Of the many design articles, technical and white papers, and webinars on this topic . Several recent ones which are my Editor’s Top Picks are:

Memory allocation in C
Improving performance for dynamic memory allocation
Memory allocation and fragmentation in C & C++

Of the many columns on Embedded.com by Niall Murphy, Jack Ganssle and Dan Saks on this topic, my favorites include:

The yin and yang of dynamic allocation
Flushing out memory leaks
Stack management

Also, I’ve come across a number of recent conference papers and journal articles on this technique that I found particularly instructive, including:

Versatile stack management for multitasking sensor networks
Memory allocation strategies for RTOSes used in embedded devices
Memory Management in Resource Constrained Embedded Systems
Efficient dynamic heap allocation of scratch-pad memory
Heap management for limited local memory multi-core processors

Embedded.com Site Editor Bernard Cole is also editor of the twice-a-week Embedded.com newsletters as well as a partner in the TechRite Associates editorial services consultancy. He welcomes your feedback. Send an email to , or call 928-525-9087.

See more articles and column like this one on Embedded.com.Sign up for s ubscriptions and newsletters . Copyright © 2012 UBM–All rights reserved.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.