对每一个非初始化堆指针存储,卡片标记算法可以只增加两到三个机器指令,并要求在小的收集时对所有脏卡片上的对象进行扫描。
Card marking algorithms can add as little as two or three machine instructions per non-initializing heap pointer store, and entails scanning any objects on dirty CARDS at minor collection time.
清单3演示了未初始化内存的概念,这是用. bss部分指令(第14行)定义的。
Listing 3 illustrates the concept of uninitialized memory, defined using the.bss section directive (line 14).
这些指令大多数是为了检查i的初始化,以及使用锁执行线程安全的初始化。
Most of these instructions are in place to check for the initialization of I, and to perform a thread-safe initialization using a lock.
应用推荐