It mainly stores a lot of c/c++ code instead of java code
Because jvm needs to interact with the operating system through c/c++ code.
Heap
Heap
Through the new keyword, the heap memory is used to create an object.
Features
It is shared by threads, and all objects in the heap need to consider thread safety
Has a garbage collection mechanism
Heap memory diagnosis
jps tool 1. View which java processes are in the current system
jmap tool 1. View heap memory usage jmap-head process id (non-continuous)
jconsole tool 1. Graphical interface, multi-functional testing tool that can continuously test
Thinking 1. After garbage collection, the memory usage is still very high . 1. The problem is that the methods in the program are being called all the time, and they are still being used during garbage collection and cannot be garbage collected.