Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.
If you mean Dynamic allocation , yes
Dynamic allocation will lead to memory fragmentation.
and you need a garbage collector .
to avoid this you can use memory pools with different sizes to make allocation from.
Regarding AVR I don't know , but basically it could happen.
In Embedded Systems program should work for ever so memory fragmentation could happen with hi probability, it's better to calculate your memory needs before compiling your code and allocate your memory staticalley.
Dynamic memory allocation happens on the heap.
As a microcontroller has no inherent OS, the heap will only exsist if you create it in code and use dynamic memory algorythms. Unless you are using an RTOS or OS, you have control over the memory.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.