Skip to main content

Memory consumption increased by 100% since j6u6.

9 replies [Last post]
aaluja
Offline
Joined: 2005-09-06
Points: 0

For example, consumption rose from 21M to 40M for the next program.

public class ProgressBar extends JFrame
{
JProgressBar jProgressBar1 = new JProgressBar();

public ProgressBar()
{
super("Test Pane");
setSize(400, 300);
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent we)
{
we.getWindow().setVisible(false);
System.exit(0);
}
});

jProgressBar1.setIndeterminate(true);
getContentPane().add(jProgressBar1, BorderLayout.CENTER);
}

public static void main(String args[])
{
(new ProgressBar()).setVisible(true);
}
}

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
aaluja
Offline
Joined: 2005-09-06
Points: 0

Sorry, you were right.

The memory decreased back to 20M by disabling the Direct3D Pipeline.

Thank you.

kamre
Offline
Joined: 2008-11-23
Points: 0

Are you running with d3d pipeline enabled? Try with option "-Dsun.java2d.d3d=false"

aaluja
Offline
Joined: 2005-09-06
Points: 0

No change.

May it have something to do with Windows Vista x64? I could not reproduce it on other computers with Vista64, but I have no idea where to look for.

aaluja
Offline
Joined: 2005-09-06
Points: 0

Does anybody know anything that may increase the memory consumption?

peter__lawrey
Offline
Joined: 2005-11-01
Points: 0

no. But if there is an increase which is non-trivial, a memory profiler should pick it up.

aaluja
Offline
Joined: 2005-09-06
Points: 0

Using the Java VisualVM, I cannot find any significant difference.

Summary:
Date taken: Mon Jan 19 17:39:10 CET 2009
File: C:\Users\ARSENI~1.ALU\AppData\Local\Temp\visualvm.dat\localhost-1352\heapdump-1232383150944.hprof
File size: 3 MB

Total bytes: 1.116.209
Total classes: 1.969
Total instances: 20.322
Classloaders: 59
GC roots: 1.822

aaluja
Offline
Joined: 2005-09-06
Points: 0

Sorry, I can’t reproduce it on other Computers.

peter__lawrey
Offline
Joined: 2005-11-01
Points: 0

I don't have j6u6 but I have tried
version, peak memory on windows
Java 6u5 , 21.7MB
Java 6u7, 21.6MB
Java 6u11, 19.7MB

linuxhippy
Offline
Joined: 2004-01-07
Points: 0

How do you measure memory consumption?