Tous les livres

Professionnel

Applis À propos Coach Connexion Commencer la lecture

Computer Science · Glossaire

Qu'est-ce que « Copying collector, forwarding pointer » ?

Aussi appelé : copying collector · forwarding pointer

Definition 9.7 University Computer Science — Year 3 · Chapitre 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.
Lire dans le chapitre →