Wednesday Nov 12, 2008

Java VM: Trying a new Garbage Collector for JDK 7


Like using the living room as the kids play area, tidying up, or garbage collection, is an integral part of life in the JVM. Except that the kids are applications and the toys on the floor the objects they create. But unlike in your living room, these kids don't sleep, are always playing with something, will scream if they have to wait while you tidy up, and will get seriously, seriously mad if they lose a toy. So how can you organize the mess they make without disrupting the game ?

The HotSpot team has been quietly working on a new algorithm, called Garbage First, for tidying up the memory space in the JVM while the kids are playing, as a replacement for the existing parallel and concurrnet mark sweep collectors. By dividing the living rooms into equal squares, it turns out that for most games, many of the squares contain unused toys that can be safely put away. By picking the low hanging fruit in this way, the new collector can work more predictably, and be given directives to operate within given time slices, which it can follow most of the time. And of course, being fully concurrent, its ready made for multiple cores.

And you can try it out because they quietly slipped it into the latest build of JDK 7.

Tony was interviewed at length about it at JavaOne 2008, and you can read more descriptions by Kirk, Alex, Charles, or get the full description in this paper.
About

A blog all about Java in all its flavors on all client platforms from smartcards to desktops and everything inbetween.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Feeds