So far, we've worked through many examples of creating FreeRTOS primitives; however, when these primitives were initially created, there wasn't much of an explanation as to where the memory was coming from. In this chapter, we'll learn exactly where the memory comes from, along with when and how it is allocated. Choosing when and how memory is allocated allows us to make trade-offs between coding convenience, timing determinism, potential regulatory requirements, and code standards. We'll conclude by looking at different measures that can be taken to ensure application robustness.
In a nutshell, this chapter covers the following:
- Understanding memory allocation
- Static and dynamic allocation of FreeRTOS primitives
- Comparing FreeRTOS heap implementations
- Replacing malloc and free
- Implementing FreeRTOS memory hooks
- Using a memory protection...