UT Dallas CS 4337 - #Sebesta ch06B Java Garbage Collection (42 pages)

Previewing pages 1, 2, 3, 20, 21, 40, 41, 42 of 42 page document View the full content.
View Full Document

#Sebesta ch06B Java Garbage Collection



Previewing pages 1, 2, 3, 20, 21, 40, 41, 42 of actual document.

View the full content.
View Full Document
View Full Document

#Sebesta ch06B Java Garbage Collection

35 views


Pages:
42
School:
University of Texas at Dallas
Course:
Cs 4337 - Organization of Programming Languages

Unformatted text preview:

Java JVM Memory Management Garbage Collection Source Reference https docs oracle com cd E13150 01 jrockit jvm jrockit geninfo diagnos garbage collect html http www oracle com webfolder technetwork tutorials obe java gc01 index html Understanding Memory Management https docs oracle com cd E13150 01 jrockit jvm jrockit geninfo diagnos garbage collect html Memory management is the process of allocating new objects and removing unused objects to make space for those new object allocations Some basic memory management concepts The basics about object allocation and garbage collection in the Oracle JRockit JVM The following topics are covered The Heap and the Nursery Object Allocation Garbage Collection The Heap and the Nursery Java objects reside in an area called the heap The heap is created when the JVM starts up and may increase or decrease in size while the application runs When the heap becomes full garbage is collected During the garbage collection objects that are no longer used are cleared thus making space for new objects Note that the JVM uses more memory than just the heap For example Java methods thread stacks and native handles are allocated in memory separate from the heap as well as JVM internal data structures The Heap and the Nursery The heap is sometimes divided into two areas or generations called the nursery or young space and the old space The nursery is a part of the heap reserved for allocation of new objects When the nursery becomes full garbage is collected by running a special young collection All objects that have lived long enough in the nursery are promoted moved to the old space thus freeing up the nursery for more object allocation When the old space becomes full garbage is collected there a process called an old collection The Heap and the Nursery The reasoning behind a nursery is that most objects are temporary and short lived A young collection is designed to be swift at finding newly allocated objects that are still alive and moving



View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view #Sebesta ch06B Java Garbage Collection and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view #Sebesta ch06B Java Garbage Collection and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?