Chiyoko_S
Garbage Collection Questions
I'm not too sure about how it allocates segments and move data around but from my understanding it is dynamic - as in, there is no fixed "gen 1 segment" and "gen 0 segment" from the beginning, but rather, as the GC requests new segments from the OS it would start out as a gen0 segment but as the objects contained in the segments gets promoted or collected it turns it into a Gen1/2 segment
22 replies
Garbage Collection Questions
The basic assumption is that most of the allocations would be short lived (e.g. string that gets discarded immediately after use) and long lived objects are likely to live for the whole duration of the app (e.g. static data that gets initialised during startup). With that assumption, it would be much more profitable to focus on collecting newly created objects rather than analysing everything (since GC itself comes with the cost of running the thing in the CPU)
22 replies