Quantcast
Channel: Memory allocation in embedded software development - Electrical Engineering Stack Exchange
Browsing all 7 articles
Browse latest View live

Answer by JimmyB for Memory allocation in embedded software development

The problem with dynamic memory allocation is just that it quickly becomes non-deterministic. First, in contrast to static allocation, dynamic memory allocation is not checked at compile/link time, so...

View Article



Answer by Dmitry Grigoryev for Memory allocation in embedded software...

Dynamic memory allocation only makes sense if you have an OS with dynamic tasks.On an embedded system your software is the only thing that will ever run. So you have an option to allocate 1000 bytes...

View Article

Answer by Lundin for Memory allocation in embedded software development

How do you handle memory allocation when you have no idea how much space you need ?You specify as much as you need to handle the worst case scenario. Not more, not less. You can't have an embedded...

View Article

Answer by Simon B for Memory allocation in embedded software development

You statically allocate memory for the worst case that you intend to support. If you intend to support up to 1000 values, create an array of 1000 items. Plan what you want the software to do if you...

View Article

Answer by Cursorkeys for Memory allocation in embedded software development

In the example below, is it really better to allocate 1000 values and end up using 30 values because you don't know how many values you really need ?In my experience, this is not a problem I've...

View Article


Answer by Michel Keijzers for Memory allocation in embedded software development

First, the problem is not the allocation, but freeing the allocated memory. This (can) lead(s) to memory gaps and pointers pointing to 'nothing' (so called dangling pointers).So one 'solution' is to...

View Article

Memory allocation in embedded software development

In embedded systems, the use of dynamic allocation is strongly discouraged. MISRA C do not allow using malloc and calloc because of their unexpected behaviour. My question is: How do you handle memory...

View Article
Browsing all 7 articles
Browse latest View live




Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>