Determine Default Java JVM HeapSize

In the life of a Java developer every now and then you’ll have one of your apps run out of memory. While this is usually due to poor coding (not closing resources, or managing large files) it helps to know exactly what the defaults are for your system. I had just this need today so went out looking for an answer.

What I found that was the most helpful was this page, but for quick reference here’s how to do it on Windows…

c:\>java -XX:+PrintFlagsFinal -version | findstr /i "HeapSize PermSize ThreadStackSize"
 
    uintx InitialHeapSize                          := 266634176       {product}
    uintx MaxHeapSize                              := 4267704320      {product}
    uintx PermSize                                  = 21757952        {pd product}
    uintx MaxPermSize                               = 85983232        {pd product}
     intx ThreadStackSize                           = 0               {pd product}
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)

Note that the values returned are in bytes so throw them into google to convert them into something useful 🙂

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Photo Journal for January 08, 2015 at 10:05PM

If I’ve had to stare at it all day then so do you 🙂
Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Photo Journal for January 07, 2015 at 06:37PM

Possibly the single most meaningful, amazing, and beautiful gift I’ve ever received. Thank you so much Uncle Randy!
Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...

Photo Journal for January 06, 2015 at 10:10PM

Playing the I hate cars game

For any of my friends who enjoy a car mystery… This is the 2006 Honda Odyssey. Yesterday around 1pm Mary got rear-ended but all seemed to be ok. It’s also colder than sin.

Today, after having kids go in and out of various doors without indecent she went to pick Al up from school. After getting in the van and putting it into reverse or drive the door ajar alarm (constant buzz) would sound until the car was put in park or neutral. It did this until she got home (drove home with the buzz) and left it for me.

When I went to look at it I noticed the same behavior and also noted that none of the door ajar dashboard lights were on. After fiddling with some things (mostly trying to diagnose a pattern), I discovered that if you put the rear doors into manual mode via the driver side dashboard switch the sound went away. Score 1 for the good guys.

Unfortunately, I knew someone wouldn’t consider that a permanent fix so I went looking for another solution. What I found online suggested removing the drivers side #7 fuse labeled “back up”, so I gave that a shot. When you remove that fuse the beeping for doors open/key in the ignition stops and the rear power doors do not work at all. After waiting the prescribed 30-60 seconds I replaced the fuse and the constant buzz in drive/reverse is no longer there, but now the passenger side sliding door does not open automatically (just manually).

So I and apparently Google appear to be out of ideas. That and I’m tired. If any of you can help me w/ a solution that doesn’t require a trip to the mechanic there’s many beers or other beverages of choice in your future.

Please remember to subscribe to the newsletter to stay up to date!

You or someone you know looking to buy or sell?
Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I don't link to anything I don't use myself. You would think this should be self evident these days, but apparently not...