CS201J: Engineering Software, Fall 2003
|
Notes: Thursday 13 November 2003
Schedule
- Tuesday, 18 November: No class
- Tuesday, 25 November: PS6 Due
- Tuesday, 2 December: Exam 2 Out
- Friday, 5 December: Exam 2
Garbage Collection
Mark and Sweepactive = all objects on stack while (!active.isEmpty ()) newactive = { } foreach (Object a in active) mark a as reachable foreach (Object o that a points to) if o is not marked newactive = newactive U { o } active = newactive sweep () // remove unmarked objects on heapWhat are the advantages of Stop and Copy over Mark and Sweep?
What are the disadvantages of Stop and Copy?
What are the advantages of Reference Counting?
Why does multi-threading make garbage collection difficult?
If we had unlimited memory, is garbage collection still important?
University of Virginia Department of Computer Science CS 201J: Engineering Software |
Sponsored by the National Science Foundation |
cs201j-staff@cs.virginia.edu |