WHAT IS AN OVERLAY?
What are overlays used for?
- An overlay is one of two or more pieces of code (or data) that can be loaded to a pre-determined memory region on demand at run-time
- Initially, each overlay is stored in ROM/Flash, just like ordinary code/data.
- During run-time, an overlay can be copied to a known address in RAM and executed there when required
- This can later be replaced by another overlay when required. Only one overlay can occupy that space in RAM at any time.
What are overlays used for?
- Overlays are useful where the system has some fast RAM or RAM resources are limited.
- RAM typically is faster than ROM/Flash so it can be beneficial to copy code there to execute.
- The system can be designed such that some portions of code/data share a certain RAM region.
- These code/data are independent to each other and are only required at specific times.
- Systems designed in this way may achieve higher run-time performance or RAM space saving.
No comments:
Post a Comment