Skip to main content

1.6.0_14-ea memory leak with G1

2 replies [Last post]
Joined: 2004-06-22


When using G1 on a Swing GUI I have what seems to be a memory leak.
The heap grows and grows and grows.. behavior that did not exist in 1.6.0u13.
It seems to me as well that there are massive junks of memory blocks allocated then released..

It is easy to say this, but how can I help in providing more details, like a memory snapshot of the vm?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2004-06-22

For ex, app has been running for 1h

1.6.0_14-ea without G1

6 mb used, 17 mb committed (Task manager shows 62 mb)

1.6.0_14-ea with G1

150 mb used, 211 mb committed (TM shows 320 mb)

Joined: 2005-04-25

Can you check if the leak is in the native heap or the java heap?
You can tell the java heap size by means of for example -XX:+PrintGCDetails,
and you can tell C-heap usage on Solaris for instance via pmap.
(On Windows, the task manager might possibly give you a breakdown?)