Embedded Linux: Memory Fragmentation
Posted
by
waffleman
on Stack Overflow
See other posts from Stack Overflow
or by waffleman
Published on 2011-01-17T14:49:09Z
Indexed on
2011/01/17
14:53 UTC
Read the original article
Hit count: 297
In many embedded systems, memory fragmentation is a concern. Particularly, for software that runs for long periods of time (months, years, etc...). For many projects, the solution is to simply not use dynamic memory allocation such as malloc/free and new/delete. Global memory is used whenever possible and memory pools for types that are frequently allocated and deallocated are good strategies to avoid dynamic memory management use.
In Embedded Linux how is this addressed? I see many libraries use dynamic memory. Is there mechanism that the OS uses to prevent memory fragmentation? Does it clean up the heap periodically? Or should one avoid using these libraries in an embedded environment?
© Stack Overflow or respective owner