1
Microcontrollers / Re: Memory model for Microcontrollers
« Last post by langwadt on Today at 07:56:45 am »QuoteWhen you only have 2K of RAM you don't waste it with the usage of malloc
Dynamically allocating storage can allow you to store more things than you have space for had you used static allocation. You just can't store them all at the same time, but that may be perfectly OK in the application. For a small micro you would probably have a combination, with dynamic memory being allocated from a block of statically allocated memory.
Er... and malloc isn't the be-all and end-all of dynamic memory. Indeed, if you think that's how it has to be done then you could well be missing some really useful techniques.
but for the things I do I yet have to run into an application that needs to share the available memory between different tasks.
then how do you manage to run any C at all without a stack?