Semua buku

Profesional

Aplikasi Tentang Pelatih Masuk Mulai membaca

Computer Science · Glosarium

Apa itu Copying collector, forwarding pointer?

Dikenal juga sebagai: copying collector · forwarding pointer

Definition 9.7 University Computer Science — Year 3 · Bab 9 — Memory Management and Garbage Collection

A copying collector splits the heap into two halves, from-space, where the program allocates, and to-space, kept empty. A collection copies every reachable cell of from-space into to-space, updates every reference to point at the copies, and swaps the two halves’ roles. When a cell is copied, its old place receives a forwarding pointer, the address of the copy, so that later references to it are redirected instead of copying it twice.

Cheney’s algorithm on the graph of exercise , after the root A was copied and scanned. A’s references were forwarded: B and C were copied and their old places hold forwarding pointers (to cells 1 and 2). E, garbage, is never touched. Scanning B next will copy D to cell 3.
Cheney’s algorithm on the graph of exercise 9.8, after the root A was copied and scanned. A’s references were forwarded: B and C were copied and their old places hold forwarding pointers (to cells 1 and 2). E, garbage, is never touched. Scanning B next will copy D to cell 3.
Baca dalam konteks →