How should I manage memory in my mission critical embedded application?
I found some articles with google, but couldn't pinpoint a really useful practical guide.
The DO-178b
forbids dynamic memory allocations, but how will you manage the memory then? Preallocate everything in advance and send a pointer to each function that needs allocation? Allocate it on the stack? Use a global static allocator (but then it's very similar to dynamic allocation)?
Answers can be of the form of regular answer, reference to a resource, or reference to good opensource embedded system for example.
clarification: The issue here is not whether or not memory management is availible for the embedded system. But what is a good design for an embedded system, to maximize reliability.
I don't understand why statically preallocating a buffer pool, and dynamically getting and dropping it, is different from dynamically allocating memory.
In general, a kernel's memory management responsibilities include: Managing the mapping between logical (physical) memory and task memory references. Determining which processes to load into the available memory space. Allocating and deallocating of memory for processes that make up the system.
Resource in embedded system can be defined as a hardware-controlled object that interacts with embedded software. The hardware-control object consists of interface memory for the communication between hardware and software and interrupts from hardware.
These are often due to the challenges of manual memory management. Here are a few common issues found when having to manually manage memory in code. The program has allocated heap memory but failed to free that piece of memory. Data on the heap must be allocated and de-allocated manually, using malloc and free.
Application memory management. Application memory management involves supplying the memory needed for a program's objects and data structures from the limited resources available, and recycling that memory for reuse when it is no longer required.
As someone who has dealt with embedded systems, though not to such rigor so far (I have read DO-178B, though):
Really, though, I think your answers might be found in joining http://www.do178site.com/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With