line breaks
This commit is contained in:
@@ -143,16 +143,21 @@ stack:
|
|||||||
## 25.10 Garbage Collection Comparison
|
## 25.10 Garbage Collection Comparison
|
||||||
|
|
||||||
- Reference Counting:
|
- Reference Counting:
|
||||||
- + fast and incremental
|
|
||||||
|
- \+ fast and incremental
|
||||||
- – can’t handle cyclical data structures!
|
- – can’t handle cyclical data structures!
|
||||||
- ? requires ∼33% extra memory (1 integer per node)
|
- ? requires ∼33% extra memory (1 integer per node)
|
||||||
|
|
||||||
- Stop & Copy:
|
- Stop & Copy:
|
||||||
|
|
||||||
– requires a long pause in program execution
|
– requires a long pause in program execution
|
||||||
+ can handle cyclical data structures!
|
+ can handle cyclical data structures!
|
||||||
– requires 100% extra memory (you can only use half the memory)
|
– requires 100% extra memory (you can only use half the memory)
|
||||||
+ runs fast if most of the memory is garbage (it only touches the nodes reachable from the root)
|
+ runs fast if most of the memory is garbage (it only touches the nodes reachable from the root)
|
||||||
+ data is clustered together and memory is “de-fragmented”
|
+ data is clustered together and memory is “de-fragmented”
|
||||||
|
|
||||||
- Mark-Sweep:
|
- Mark-Sweep:
|
||||||
|
|
||||||
– requires a long pause in program execution
|
– requires a long pause in program execution
|
||||||
+ can handle cyclical data structures!
|
+ can handle cyclical data structures!
|
||||||
+ requires ∼1% extra memory (just one bit per node)
|
+ requires ∼1% extra memory (just one bit per node)
|
||||||
|
|||||||
Reference in New Issue
Block a user