Continue to Site

Welcome to EDAboard.com

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.

Relation between dynamic and memory fragmentation

Status
Not open for further replies.

JaMe

Junior Member level 1
Junior Member level 1
Joined
Nov 8, 2006
Messages
19
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Indonesia
Activity points
1,406
what is the relation between dynamic and memory fragmentation ? Is something like that could occur in AVR microcontroller?
 

Hi

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.

Salam
Hossam Alzomor
www(.)i-g(.)org
 

    JaMe

    Points: 2
    Helpful Answer Positive Rating
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.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top