Todos os livros

Profissional

Apps Sobre Coach Entrar Começar a ler

Quantitative Finance · Glossário

O que é Garbage collector, stop-the-world pause?

Também chamado de: garbage collector · stop-the-world pause

Definition 10.1 Low-Latency Software · Capítulo 10 — Managed and Functional Languages on the Desk

A garbage collector reclaims memory that the program can no longer reach, by tracing references from the program’s roots (stacks, globals). Most divide the heap into generations: new objects in a small young generation, collected often and cheaply; survivors promoted to an old generation, collected rarely and at a cost that grows with its size. A stop-the-world pause is an interval during which the collector has stopped every application thread.

A generational heap. Allocation fills the young generation, whose collections cost in proportion to what survives; survivors move to the old generation, whose full collections scan everything alive, and stop or slow the program for longer as the heap grows.
Figure 10.1. A generational heap. Allocation fills the young generation, whose collections cost in proportion to what survives; survivors move to the old generation, whose full collections scan everything alive, and stop or slow the program for longer as the heap grows.
Ler no capítulo →