Angelika Langer - Training & Consulting
HOME | COURSES | TALKS | ARTICLES | GENERICS | LAMBDAS | IOSTREAMS | ABOUT | NEWSLETTER | CONTACT | Twitter | Lanyrd | Linkedin
HOME 


  UPCOMING
  PREVIOUS
  MATERIALS
 
GENERICS 
LAMBDAS 
IOSTREAMS 
ABOUT 
NEWSLETTER 
CONTACT 
Memory Allocation and Garbage Collection in Java - Tutorial

Memory Allocation and Garbage Collection in Java - Tutorial  
ABSTRACT
 
In Java, allocation and deallocation of heap memory are handled by the virtual machine, i.e., by its memory manager and its garbage collector.  This concept frees developers from the chores of explicit memory allocation and deallocation and eliminates the pitfalls that explicit memory management comes with, e.g. there are no memory leaks or dangling pointers in Java.  Despite of this undeniable benefit, Java programs occasionally exhibit performance defects that are caused by excessive memory allocation or massive and time-consuming garbage collection.  In order to eliminate these adverse effects on the program's overall performance, a Java developer needs an understanding of the memory allocation and garbage collection strategies of the JVM.

The tutorial gives an overview of various garbage collection algorithms employed by the Java virtual machine of Sun's JDK 6 including tips and tricks for tuning the garbage collector, use of memory profilers and garbage collection profilers.  We will also briefly touch on escape analysis, which is an optimization technique used by the JVM to completely eliminate heap memory allocation and deallocation for certain objects. 

Topics: 

  • garbage collection principles and algorithms
    •  mark-and-sweep, fragmentation and compaction
    •  generational GC
    •  parallel, concurrent and incremental GC
  • memory allocation an escape analysis
    •  heap objects vs. stack objects
  • JVM profiling
    •  profiling tools
    •  profiling stragies
    •  detection of unwanted references and loitering objects
  • GC profiling
    •  GC profiling tools
    •  GC tuning options 
 
PREREQUISITES

 
Level: intermediate
Duration: 90 min
Prerequisites: Attendants should be familiar with Java.
Presented at: ACCU Conference 2009 , Oxford,UK, May 22-25, 2009

 
 
 

If you are interested to hear more about this and related topics you might want to check out the following seminar or skim through some further reading:
Seminars
Effective Java
4 day seminar (open enrollment and on-site)
High-Performance Java
4 day seminar (open enrollment and on-site)
 
  © Copyright 1995-2009 by Angelika Langer.  All Rights Reserved.    URL: < http://www.AngelikaLanger.com/Conferences/Abstracts/GC-Algorithms-and-Tuning.htm  last update: 23 Jun 2009