In addition to mark-and-sweep, the garbage collectors for .Net and Java both also run a compaction phase to cut down on memory fragmentation. I am not able to find any documentation on a compaction/defragmentation phase for the Flash 9 garbage collector - does Flash not have any compaction phase?
+2
A:
Well, I've been fairly deep into memory management issues and I've talked to Adobe engineers about it, and I never heard any mention of a defrag phase. On the other hand, it seems reasonably unlikely that they'd leave it out, and I've certainly seen my overall memory use drop after a GC, in the sort of way you'd expect it to if there was a defrag phase. So overall I'd say there probably is such a phase.
But what I do feel fairly confident about is that I don't think there's any official public docs on it either way. I certainly never saw any, anyhow. If anyone knows otherwise I'll happily rescind, but just in case you don't get any other answers.
fenomas
2009-06-12 08:03:32