On 07/04/2009 17:40, Jim Battle wrote:
Once upon a time, I disassembled a lot of the TRS-80
model III ROM. Part
of that was the garbage collection routine. Because strings were
dynamically allocated without any explicit recovery mechanism, the
interpreter would on occasion have to sweep dead strings from memory.
This gave the appearance of locking up the computer for long stretches
-- the amount of time varied based on the amount of free memory and the
number of active strings. It could easily take more than half a minute.
Garbage collection isn't as trivial as one might think. There's a
trade-off between space and time, and there's a well-known story about
a student of David Moon's at MIT(?), and Marvin Minsky (who wrote a
pretty well-known GC at SAIL). Search Google for "Minsky garbage" and
look up
http://groups.csail.mit.edu/mac/users/dae/notes/ai-koans
--
Pete Peter Turnbull
Network Manager
University of York