开发者

java GC name 'MarkSweepCompact'

what is MarkSweepCompa开发者_如何学Goct ?


It's a garbage collection algorithm. It's basic workings are described in Wikipedia.

The basic idea is that you perform one "marking" pass over all your objects you can access, marking them. Then you "sweep" over your heap, freeing the memory of those objects that can't be reached anymore (which are not marked). The "compact" pass then compacts memory again since you now have multiple unused holes in it which can make allocation of new objects more difficult or expensive.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜