Thursday, 7 May 2009

What is the size of Eden?

What should the size of Eden be? Is 128mb sufficient?
What is the difference between a minor and major collection?

In Java memory is managed in generations, which are memory pools for holding objects of different ages.

GC occurs in each generation when it fills up.

Objects are ALLOCATED in Eden, and most objects die there. When Eden fills up, a minor collection occurs, during which some objects move to an older generation. When older objects need to be collected, a major collection occurs (this is often slower since it involves all living objects).

No comments: