This post is about the HotSpot JVM – that’s the ‘normal’ JVM from Oracle (previously Sun). It is the one you would most likely use on Windows. If you are using a Linux variant that errs on the side of free software (like Ubuntu), you might have an open source JVM. Or if your JVM came with another product, like WebLogic, you may even have the JRockit JVM from Oracle (formerly BEA). And then there are other JVMs from IBM, Apple and others. Most of these other JVMs work in a similar way to HotSpot, with the notable exception of JRockit, which handles memory differently, and does not have a separate Permanent Generation (see below) for example.
First, let’s take a look at the way the JVM uses memory. There are two main areas of memory in the JVM – the ‘Heap’ and the ‘Permanent Generation.’ In the diagram below, the permanent generation is shown in green. The remainder (to the left) is the heap.