No, it is not a simple Mark and Sweep gc (which usually don't move objects
in memory), it is a generational gc that works by copying live objects to
avoid memory fragmentation (with special handling for large objects).
The *algorithm* it uses as to whether objects are alive or not is called Mark and Sweep. Yes it also performs generational compaction as well. And of course it doesn't always compact the heap either, it uses heuristics to assess the benefit of compacting compared with the overhead of all the memory copies.
No, it is not a simple Mark and Sweep gc (which usually don't move objects
in memory), it is a generational gc that works by copying live objects to
avoid memory fragmentation (with special handling for large objects).
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.