On 1/26/2019 1:29 AM, Dimitrios Chr. Ioannidis via fpc-pascal wrote:
Hi,

  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...

Ralf


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to