Pergunta de entrevista da empresa Synechron

when JVM trigger gc.

Respostas da entrevista

Sigiloso

18 de dez. de 2019

Minor GC is always triggered when JVM is unable to allocate space for a new Object, e.g. the Eden is getting full. So the higher the allocation rate, the more frequently Minor GC is executed. Whenever the pool is filled, its entire content is copied and the pointer can start tracking the free memory from zero again

Sigiloso

24 de dez. de 2020

There is Old and Young (Eden) GC , also there are many levels in Young. If you play around VM visualizer you can find Young does lot of work on free up. Old generally have things which won't be GC for example String Pool, metadata.