Unit content
Bounded memory use in embedded software
Embedded targets often have a fixed and relatively small amount of RAM. Memory use must therefore be treated as a bounded resource rather than something the system can expand on demand.
Static allocation reserves storage with a lifetime and maximum size known without requesting new heap blocks during operation. It can make worst-case memory consumption easier to reason about.
Dynamic allocation can still be appropriate, but repeated allocation and deallocation introduce possible allocation failure and can fragment a finite heap. Software that requires deterministic long-term behavior should know what happens when memory cannot be obtained.
Stacks are bounded too. Large local objects, deep call chains, recursion and multiple RTOS task stacks can consume RAM even when the heap is unused.
Linker output can show the static memory footprint, while run-time instrumentation can estimate stack high-water marks or other peak usage.
Reliable embedded software therefore reasons about maximum memory demand and failure behavior, not only typical consumption.