[fpc-pascal] AVR GetMem/AllocMem
freedos.la at gmail.com
Sat Jan 26 20:47:24 CET 2019
On 1/26/2019 1:29 AM, Dimitrios Chr. Ioannidis via fpc-pascal wrote:
> AFAIU dynamic allocation memory does not exist for AVR platform (
> tried to use AllocMem, GetMem and the mcu restart it's self. ) .
> Is there any other way to dynamically allocate memory in AVR ?
I have not used any AVR with FPC (I hope to do so on the next project
that comes along), but the general problem is that you have extremely
limited amount of RAM on those micro controller chips. The popular ones
used on the Arduino Uno and Leonardo, just as an example, do have only
2KB and 2.5KB of RAM to work with. So it is very unwise to rely on any
form of dynamic memory allocation. There is just no guarantee that there
is enough RAM for such operations available. It simply requires a
different mindset and a lot of planning ahead, more than on pretty much
any other platform these days...
This email has been checked for viruses by Avast antivirus software.
More information about the fpc-pascal