what is MarkSweepCompact ?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With