From af8c49d96ac26d95031c2d51f58f02e1a58c0f92 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Thu, 21 Jan 2016 22:49:41 -0500 Subject: [PATCH] WIP --- docs/Garbage-Collector.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/Garbage-Collector.md b/docs/Garbage-Collector.md index cbebe4ae..998df221 100644 --- a/docs/Garbage-Collector.md +++ b/docs/Garbage-Collector.md @@ -158,27 +158,27 @@ The collector will update its status variable and then wait for all of the colle During a GC cycle the collector thread transitions through the following states: ### Clear -The collector swaps the values of the clear color (white) and the mark color (black). This is more efficient than modifying the color on each object in the heap. The collector then transitions to sync 1. +The collector swaps the values of the clear color (white) and the mark color (black). This is more efficient than modifying the color on each object in the heap. The collector then transitions to sync 1. At this point no heap objects are marked, as demonstrated below: Initial object graph ### Mark -The collector transitions to sync 2 and then async. At this point it marks the global variables and waits for the mutators to also transition to async. +The collector transitions to sync 2 and then async. At this point it marks the global variables and waits for the mutators to also transition to async: Initial object graph ### Trace -The collector finds all live objects using a breadth-first search and marks them black. +The collector finds all live objects using a breadth-first search and marks them black: Initial object graph ### Sweep -The collector scans the heap and frees memory used by all white objects. If the heap is still low on memory at this point the heap will be increased in size. - -Also, to ensure a complete collection data for any terminated threads is not freed until now. +The collector scans the heap and frees memory used by all white objects: Initial object graph +If the heap is still low on memory at this point the heap will be increased in size. Also, to ensure a complete collection data for any terminated threads is not freed until now. + ### Resting The collector cycle is complete and it rests until it is triggered again.