Skip to main content

JRE memory footprint on WindowsXP

1 reply [Last post]
joegood
Offline
Joined: 2006-02-17
Points: 0

Am I the only Swing developer/user that cringes when they see the amount of memory being used by the JRE under TaskManager? I can create an empty JFrame and the JRE still manages to consume 13MB or RAM.

Here is the code for the JFrame:
public class SimplerFrame extends javax.swing.JFrame
{
public static void main(String args[])
{
SimplerFrame Sf = new SimplerFrame();
Sf.setSize(800, 600);
Sf.setTitle("Simple Frame");
Sf.setDefaultCloseOperation(Sf.EXIT_ON_CLOSE);
Sf.setVisible(true);
}
}

Why 13MB? I know that the JRE has to load classes, probably JIT compiler, etc, but it sure seems like a huge memory footprint for such a simple application. The corresponding MFC application uses only 3MB. I am not trying to start a flame war, I love java, but Sun needs to explain this problem to the developers/users or fix it if possible. Couldn't they load all of that extra stuff in some other process, maybe a JRE service? This would at least make the individual program look like it is using a small amount of memory.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
barryman_5000
Offline
Joined: 2005-05-12
Points: 0

I don't think anybody is worried about it "looking" like a smaller amount of memory. I think it is more important that the overall memory use be lower. Look for a classloaded environment for java programs. They are like a service that will load faster and use less memory(total).