1) Heap memory: memory in the JVM process managed by the JVM to represent Java objects
2) Internal memory / Inactive memory : this is memory allocated in the process address space that is not on the heap.
3) Direct memory : similar to native, but also implies that the shared buffer in the hardware is shared. For example, a buffer inside a network adapter or graphic display. The goal here is to reduce the number of copies that copy the same bytes in memory.
Finally, depending on the OS, additional internal allocations (assignment of memory address space) can be performed through Unsafe alloc and / or by matching memory with a file. Of particular interest is the mapping of memory to a file, since it can easily allocate more memory than the machine currently has as physical RAM. Also note that the limitation of the total address space is limited by the size of the pointer used, the 32-bit pointer cannot go beyond 4 GB. Period.
source share