From 9f45f5df7045b72151c140f941a8574f5fbf80bc Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Wed, 25 Jul 2018 17:04:46 -0400 Subject: [PATCH] Update Garbage-Collector-Lazy-Sweeping.md --- docs/Garbage-Collector-Lazy-Sweeping.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Garbage-Collector-Lazy-Sweeping.md b/docs/Garbage-Collector-Lazy-Sweeping.md index 8cfe2ff7..087d0afe 100644 --- a/docs/Garbage-Collector-Lazy-Sweeping.md +++ b/docs/Garbage-Collector-Lazy-Sweeping.md @@ -17,7 +17,7 @@ # Introduction -Cyclone uses a concurrent mark-sweep garbage collection algorithm [described in detail here](Garbage-Collector.md). One of the basic improvements to mark-sweep suggested by the [Garbage Collection Handbook](#references) is lazy sweeping. +Cyclone uses a concurrent mark-sweep garbage collection algorithm [described in detail here](Garbage-Collector.md). One of the main improvements to mark-sweep suggested by the [Garbage Collection Handbook](#references) is lazy sweeping. The basic idea is that instead of having the collector thread sweep the entire heap at once when tracing is finished, each mutator thread will sweep its own heap incrementally as part of allocation. When no more free space is available to meet a request the allocator will check to see if there are unswept heap pages, and if so, the mutator will pick one and sweep it to free up space. This amortizes the cost of sweeping.