354 CHAPTER 14 SOLVING COMMON JAVA EE (Christian web host)

354 CHAPTER 14 SOLVING COMMON JAVA EE PERFORMANCE PROBLEMS Objects are created in Eden. When Eden is full, the garbage collector iterates over all objects in Eden, copies live objects to the first survivor space, and frees memory for any dead objects. When Eden again becomes full, it repeats the process by copying live objects from Eden to the second survivor space, and then copying live objects from the first survivor space to the second survivor space. If the second survivor space fills and live objects remain in Eden or in the first survivor space, then these objects are tenured (that is, they are copied to the old generation). When the garbage collector cannot reclaim enough memory by executing this type of minor collection, also known as a copy collection, then it performs a major collection, also known as a stop-the-world collection. During the stop-the-world collection, the garbage collector suspends all threads and performs a mark and sweep collection on the entire heap, leaving the entire young generation empty and ready to restart this process. Figures 14-2 and 14-3 illustrate how minor collections run. Figure 14-2. Objects are created in Eden until it is full. Then the garbage collector traverses all objects in Eden, freeing dead objects and copying live objects to the survivor space until it is full. Live items remaining in Eden are moved to the tenured space.
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.

Leave a Reply