Re: STL containers and managing memory allocation in embedded systems
- From: Michiel.Salters@xxxxxxxxxx
- Date: 31 Mar 2006 07:12:10 -0800
Hans-Bernhard Broeker wrote:
In comp.arch.embedded Alex Vinokur <alexvn@xxxxxxxxxxxxxxxxxxxxx> wrote:
The memory allocation issue in embedded systems is usually critical..
It's usually beyond critical --- it's inacceptable, period. An
embedded system has nobody to complain to if an operation as strictly
internal as a memory allocation fails. So it had better not go there
at all.
That's a bit overkill - not all embedded systems are 100%
mission-critical.
I.e. you might have a system logger, a configuration deamon etcetera.
Sure,
it would be annoying if they failed, but the watchdog can restart them
once
the critical parts are done using all memory.
Of course, the parts that ARE critical will be designed such that no
memory allocation ever fails.
2. But how to manage memory allocation in containers for embedded
systems?
Primarily by not using them.
Used to be true for 512 byte, single function embedded systems. Doesn't
matter so much for 512 Megabyte systems today, where the critical
functions need 200 Mb max.
Remember: even on real-time systems, being faster may be useful, and
using
dynamically allocated memory is a good way to achieve that (e.g. for
caches)
HTH
Michiel Salters
.
- Prev by Date: Re: STL containers and managing memory allocation in embedded systems
- Next by Date: Re: Anyone ever use homeplug or other powerline networking?
- Previous by thread: Re: STL containers and managing memory allocation in embedded systems
- Next by thread: Disassembling/Debugging the PC's BIOS?
- Index(es):