V2EX  ›  英汉词典

Register Allocation

Definition / 释义

(编译原理)寄存器分配:编译器在生成机器代码时,决定把哪些变量/临时值放入CPU寄存器、哪些放入内存(如栈)的过程,以提高运行速度并满足寄存器数量有限的约束。(常见方法包括图着色、线性扫描等;必要时会发生 spilling 把值“溢出”到内存。)

Pronunciation / 发音

/ˈrɛdʒɪstər ˌæləˈkeɪʃən/

Examples / 例句

Register allocation can make programs run faster.
寄存器分配可以让程序运行得更快。

The compiler performs register allocation using graph coloring, spilling values to the stack when registers are scarce.
编译器使用图着色来进行寄存器分配,当寄存器不足时会把一些值溢出到栈上。

Etymology / 词源

register 源自拉丁语 registrum(“登记册、记录”),在计算机语境中引申为“用于快速存取数据的寄存器”。allocation 来自拉丁语 allocare(“分配、指派”)。合起来的 register allocation 字面义即“对寄存器进行分配”,在编译器领域专指将计算值映射到寄存器或内存位置的优化/资源分配步骤。

Related Words / 相关词

Notable Works / 著作例证

  • Compilers: Principles, Techniques, and Tools(Aho, Lam, Sethi, Ullman,“龙书”)
  • Engineering a Compiler(Cooper & Torczon)
  • Modern Compiler Implementation in C/Java/ML(Andrew W. Appel)
  • Advanced Compiler Design and Implementation(Steven S. Muchnick)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   982 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 17:49 · PVG 01:49 · LAX 09:49 · JFK 12:49
♥ Do have faith in what you're doing.