|
Tech Focus
Efficient and bug-free memory management
Mastering stack and heap for system reliability: Part 1 – Calculating stack size
Mastering stack and heap for system reliability: Part 2 - Properly allocating stacks
Mastering stack and heap for system reliability: Part 3 - Avoiding heap errors
Editor's Note
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 of IAR Systems, 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.
To complement their series of tutorials, here are the links to a variety of design articles, technical and white papers, and webinars on this topic. Of these my Editor's Top Picks are:
Memory allocation in C
Improving performance for dynamic memory allocation
Memory allocation and fragmentation in C & C++
In the Insight section regular columnists Jack Ganssle and Dan Saks provide their perspective on this topic. And in Resources Around the Network are a number of conference papers and journal articles on the latest techniques in embedded system memory management.
(Editor's Note: If you have an idea for a project or a topic you would like to share with other embedded system developers at the spring ESC Silicon Valley in April, 2013, submit an abstract . Deadline is Nov. 2. And if they are not interested, give me a call at 928-525-9087 or email me.)
Development
Memory allocation in C
Dynamic memory allocation and the structures that implement it in C are so universal that they're sometimes treated as a black box. In the real world of embedded systems, that may not be desirable or even possible. (This article first appeared in the August 1989 issue of Embedded Systems Programming magazine. )
Dynamic allocation in C and C++
C and C++ have strikingly different approaches to managing dynamic
memory.
The yin and yang of dynamic allocation
Despite its risks, dynamic memory allocation is a valuable facility that you shouldn't blindly disregard.
Improving performance for dynamic memory allocation
To heap or not to heap need no longer be the question. Nor is dynamic versus static your only choice in allocating memory in constrained embedded designs.
Destruction aids memory management in object-oriented C
Proper memory management is a key component of any successful object-oriented application. This article addresses the relevant issues, with a focus on the object-oriented C programming scheme previously demonstrated.
Building a user space library for dynamic memory analysis
Amarender Barrenkala describes simple straightforward technique for building a user space library for dynamic memory analysis and provides some examples of how it can be used.
Deterministic dynamic memory allocation & fragmentation in C & C++
Colin Walls details the problems with dynamic memory allocation, which tends to be non-deterministic, leading to unexpected allocation failures and describes an approach that resolves such issues.
Tackling memory allocation in multicore and multithreaded applications
Embedded database experts from McObject describe how to build a custom memory manager to avoid the locking conflicts that often occur in multithreaded or multicore designs with two or more processors.
Practical Ada Memory Management Strategies for Real-Time Systems
If an embedded-systems programmer uses Ada long enough, he or she will undoubtably need to represent a variable-sized data structure, possibly at an address determined at runtime. Links between such structures may also be necessary, and the programmer may finally break down and attempt to use pointers.
Allocating memory in MATLAB-to-C code
MATLAB frees you from having to think about memory allocation and actively encourages the use of variable-size arrays. But memory, time, and hardware constraints limit how the C implementation allocates memory. Here are some workarounds.
Products
Poly-Platform 2.0 features enhanced memory management for multicore apps
PolyCore Software, Inc. (PSI) has added significant functionality to Version 2.0 of its Poly-Platform multicore software platform.
Coverity raises static analysis for codes a notch
The concept of Boolean satisfiability is being applied to identify "bugs" in software code.
DESIGN East - LDRArules programming rule checker assures standards compliance
LDRArules is a programming rule checker that brings together a collection of rules from a broad spectrum of programming standards.
LDRA tool suite integrates MISRA AC for verification of auto-generated code
LDRA's MISRA AC provides independent verification of the auto-generated code, a critical factor in stringent certification requirements.
Industry
FRAM helps TI cut power for Wolverine MSP430 platform
Wolverine is the moniker chosen by Texas Instruments for an ultra-low-power MSP430 microcontroller platform launched here which provides 360 nA real-time clock mode - more than doubling battery life - and less than 100 μA/MHz active power consumption.
Code base growth drives static analysis market
Embedded software engineers using a static analysis tool are working on projects with significantly larger average numbers of in-house developed lines of software code than developers not using a static analysis tools according to research by VDC Research.
LDRA tool suite supports integration with VisualDSP++
LDRA has integrated its tools suite with the Analog Devices VisualDSP++ (VDSP++) software development environment. The tool suite provides automated software testing and verification across all stages of software development.
|