覆盖 (编程)
在一般的计算机概念中,覆盖(Overlay)表示将一块指令或数据替换为另一块的行为。覆盖是一种编程技术,允许程序在主存空间不足时仍能运行。在嵌入式系统中,由于缺乏虚拟内存机制,覆盖技术也被广泛应用以克服物理内存的限制。
例子
以下是一个示例,展示了用于使OS/360链接编辑器链接覆盖程序的控制语句。
INCLUDE SYSLIB(MOD1)
INCLUDE SYSLIB(MOD2)
OVERLAY A
INCLUDE SYSLIB(MOD3)
OVERLAY AA
INCLUDE SYSLIB(MOD4)
INCLUDE SYSLIB(MOD5)
OVERLAY AB
INCLUDE SYSLIB(MOD6)
OVERLAY B
INCLUDE SYSLIB(MOD7)
+--------------+ | Root Segment | | MOD1, MOD2 | +--------------+ | +----------+----------+ | | +-------------+ +-------------+ | Overlay A | | Overlay B | | MOD3 | | MOD7 | +-------------+ +-------------+ | +--------+--------+ | | +-------------+ +-------------+ | Overlay AA | | Overlay AB | | MOD4, MOD5 | | MOD6 | +-------------+ +-------------+
This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.