
238 Embedded systems design
Given this performance difference, it is important that the
memory resources are carefully allocated. In the example, task A
requires the best performance and the system needs fast task
switching. This means that both the task A code and data, along
with the RTOS and the system stack, are allocated to the internal
memory where it will get the best performance. All other task code
and data are stored externally because all the internal memory is
used.
The third example shows a dynamic allocation system
where tasks can request additional memory as and when they
need it. The first map shows the initial state with the basic memory ...